Commit 5945aa2
fix(typespec-vscode): fix e2e create-project test failing on peer dep conflicts (#10306)
After each release, core packages (e.g. `@typespec/rest@0.81.0`) bump to
new versions before emitter packages (`@typespec/http-client-js@0.14.1`
still peers on `@typespec/rest@^0.80.0`). The e2e test scaffolds a
project with all deps set to `"latest"` and selects all emitters, so
`npm install` fails with `ERESOLVE` — no `node_modules` or
`package-lock.json` created.
The test then does an exact file list assertion that includes those
install artifacts and fails.
### Changes
- **Remove install artifacts from expected files** in
`create-typespec.test.ts` — `node_modules` and `package-lock.json`
depend on npm registry state and are not what this test validates (the
UI scaffolding flow is)
- **Switch `expectFilesInDir` to subset matching**
(`expect.arrayContaining`) so the assertion passes whether install
succeeds or not, without masking missing scaffolded files
- Fix pre-existing typo: `exected` → `expected` in the touched function
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>1 parent 442eaac commit 5945aa2
2 files changed
Lines changed: 4 additions & 11 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 34 | + | |
42 | 35 | | |
43 | 36 | | |
44 | 37 | | |
| |||
0 commit comments