Skip to content

Fix the test runner so npm test can launch VS Code again - #1869

Closed
isc-klu wants to merge 19 commits into
intersystems-community:masterfrom
isc-klu:test-runner-fixes
Closed

Fix the test runner so npm test can launch VS Code again#1869
isc-klu wants to merge 19 commits into
intersystems-community:masterfrom
isc-klu:test-runner-fixes

Conversation

@isc-klu

@isc-klu isc-klu commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

npm test has not been able to launch VS Code for a while. These are the runner-only fixes needed before replacing the suite itself (#1863).

  • @vscode/test-electron 2.x looks for Contents/MacOS/Electron, which VS Code 1.110+ renamed, so every macOS run failed with spawn ... ENOENT. Bumped to 3.x; its typings need skipLibCheck with our pinned @types/node.
  • Dropped the -n launch arg, which Electron rejects (bad option: -n) now that the runner spawns it directly.
  • Unset ELECTRON_RUN_AS_NODE, inherited when running from an extension-spawned terminal. Otherwise the downloaded VS Code runs as plain Node and tries to execute the workspace file as a script.
  • Fresh --user-data-dir per run so cached state can't leak between runs.
  • The mocha runner returned a promise that settled before the tests ran, so failures never failed npm test.

isc-klu and others added 19 commits April 13, 2026 16:31
- Bump @vscode/test-electron to 3.x: 2.x looks for Contents/MacOS/Electron, which VS Code 1.110+ renamed, so every run failed with ENOENT on macOS. Its typings need skipLibCheck with our pinned @types/node.
- Drop the `-n` launch arg, which Electron rejects when the runner spawns it directly.
- Unset ELECTRON_RUN_AS_NODE, inherited from extension-spawned terminals, which made the downloaded VS Code run as plain Node and try to execute the workspace file.
- Use a fresh user-data-dir per run so cached state can't leak between runs.
- Make the mocha runner's promise settle when the tests finish instead of immediately, so failures actually fail the run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@isc-klu

isc-klu commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #1870.

@isc-klu isc-klu closed this Sep 10, 2026
@isc-klu
isc-klu deleted the test-runner-fixes branch September 10, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant