Migrate init templates to createTester API and update ESLint to latest standard#9596
Migrate init templates to createTester API and update ESLint to latest standard#9596
Conversation
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
| @@ -1,5 +1,5 @@ | |||
| import { strictEqual } from "node:assert"; | |||
| import { describe, it } from "node:test"; | |||
| import { describe, it } from "vitest"; | |||
There was a problem hiding this comment.
@copilot revert vitest, templates should try to keep using the bare minimum
There was a problem hiding this comment.
Reverted vitest imports to node:test in both templates. The snapshots have been regenerated with the bare minimum test runner. (commit: cb97df5 → current)
commit: |
timotheeguerin
left a comment
There was a problem hiding this comment.
@copilot also update the use of eslint to the latest standard
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Updated eslint to latest standard:
Changes in commit bc903f9 → current Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Added changeset using pnpm change add:
- Package: @typespec/compiler
- Type: Internal
- Summary: Update init templates to use createTester API and modern ESLint configuration
Changeset file: .chronus/changes/copilot-update-init-templates-testing-framework-2026-1-5-20-11-37.md (commit: 6f97eac → current)
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
|
You can try these changes here
|
Migration Complete: Update init templates to use new testing framework ✅
test-host.ts.muto usecreateTesterwithnode:testand correct path resolutiondecorators.test.ts.muto use new tester pattern witht.op()andnode:testeslint.config.jsto usedefineConfigfromeslint/configwithtypescript-eslintpackagepackage.jsonto usetypescript-eslintinstead of separate packagestest-host.ts.muto usecreateTesterwithnode:testand correct path resolutionhello.test.tsto usenode:testinstead ofvitesteslint.config.jsto usedefineConfigfromeslint/configwithtypescript-eslintpackagepackage.jsonto usetypescript-eslintinstead of separate packages__snapshots__directorydefineConfigChanges Made
vitestback tonode:testto keep templates minimalresolvePath(import.meta.dirname, "..")toresolvePath(import.meta.dirname, "../..")to account fordist/test/structureemitoption in emitter test-host (already in.emit()chain)@typescript-eslint/eslint-pluginand@typescript-eslint/parserwith unifiedtypescript-eslintpackage (v8.49.0)defineConfigfromeslint/configinstead oftsEslint.configfor consistency with root configSummary
Successfully migrated both library-ts and emitter-ts init templates to the new
createTestertesting framework while keeping templates minimal and using the latest ESLint standards withdefineConfigfromeslint/config. Changelog added via chronus.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.