fix(test): migrate test runner to vscode-test by monotykamary · Pull Request #1 · dwarvesf/md-ar-ext · GitHub
Skip to content

fix(test): migrate test runner to vscode-test#1

Merged
tieubao merged 8 commits into
dwarvesf:masterfrom
monotykamary:fix/eslint-errors
Apr 9, 2025
Merged

fix(test): migrate test runner to vscode-test#1
tieubao merged 8 commits into
dwarvesf:masterfrom
monotykamary:fix/eslint-errors

Conversation

@monotykamary

@monotykamary monotykamary commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

This PR migrates the VS Code extension test runner from @vscode/test-electron to the older vscode-test library and adds flags to potentially support headless CI environments.

Reason:

  • To address potential macOS access errors encountered during test execution with @vscode/test-electron. vscode-test, being the more established library, might offer better compatibility in this scenario.
  • To attempt to resolve errors (Missing X server or $DISPLAY) when running tests in headless CI environments like GitHub Actions.

Changes:

  • Uninstalled @vscode/test-electron.
  • Installed vscode-test and its peer dependencies (mocha, @types/mocha, @types/glob).
  • Updated src/test/runTest.ts to use the vscode-test API.
  • Added logic to src/test/runTest.ts to include --disable-gpu and --no-sandbox launch arguments when the CI environment variable is detected. (Note: Using xvfb in the CI workflow is the recommended approach, but this is an attempt to fix it via launch args).

Attempts to resolve 'spawn ENOENT' and subsequent 'SIGKILL' errors
during integration test execution using @vscode/test-electron.

- Uses the executable path directly returned by downloadAndUnzipVSCode.
- Adds logic to correct potentially malformed paths reported by the library
  (e.g., removing extraneous '.app' segment).
- Addresses macOS quarantine issues via xattr (though the root cause
  appears to be corrupted download/extraction).

The downloaded VS Code instance still seems damaged or incorrectly
extracted by the library, preventing successful test runs. Manual
VS Code installation might be required as a workaround.
@monotykamary monotykamary changed the title fix: resolve eslint errors and warnings fix(test): migrate test runner to vscode-test Apr 9, 2025
@tieubao tieubao merged commit 9577896 into dwarvesf:master Apr 9, 2025
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.

2 participants