Repository navigation
test: add VS Code end-to-end tests and vsce packaging - #263
Merged
Merged
Conversation
- Add @vscode/test-electron based e2e tests that launch VS Code against a temporary workspace with a sqlite3 connection, and check diagnostics, keyword / table completion (node:sqlite inside Electron) and the "Fix all auto-fixable problems" command - Run them in CI on the minimum supported VS Code (1.101.0) and stable - Add @vscode/vsce and package with --no-dependencies, since the client and the server are bundled by esbuild; whitelist the shipped files in .vscodeignore - Document how to run the tests
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.
Summary
Phase 6 of the maintenance plan: VS Code extension packaging and end-to-end tests.
E2E tests (
packages/client/test/e2e)@vscode/test-electronlaunches VS Code with the extension from the repo root against a temporary workspace. The workspace's.vscode/settings.jsonconfigures a sqlite3 connection to a database created withnode:sqlite..sqlfilenode:sqlitein Electronextension.fixAllFixableProblemsrewrites the documentpnpm test:vscodebuilds everything and runs them;VSCODE_VERSIONselects the VS Code versionvscode-e2eruns on 1.101.0 (theengines.vscodeminimum) and stable underxvfb-run, then builds the.vsixPackaging
@vscode/vsce4 as a devDependencyvscode:package/vscode:publishuse--no-dependencies: the client and server are bundled by esbuild, so node_modules are not needed (and vsce's dependency detection does not work with pnpm).vscodeignoreis now an allowlist. The.vsixcontains onlyextension.js,vscodeExtensionServer.js,package.json,README.mdandLICENSE(1.14 MB)Test plan
pnpm test:vscodelocally on VS Code 1.101.0 and 1.139.1 (stable): 3/3 passedpnpm vscode:packageproduces a.vsixwith only the files above