Fix the test runner so npm test can launch VS Code again - #1869
Closed
isc-klu wants to merge 19 commits into
Closed
Conversation
- 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>
Collaborator
Author
|
Folded into #1870. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm testhas 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-electron2.x looks forContents/MacOS/Electron, which VS Code 1.110+ renamed, so every macOS run failed withspawn ... ENOENT. Bumped to 3.x; its typings needskipLibCheckwith our pinned@types/node.-nlaunch arg, which Electron rejects (bad option: -n) now that the runner spawns it directly.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.--user-data-dirper run so cached state can't leak between runs.npm test.