Skip to content

test: add VS Code end-to-end tests and vsce packaging - #263

Merged
joe-re merged 1 commit into
releasefrom
chore/vscode-extension-e2e
Sep 25, 2026
Merged

joe-re merged 1 commit into
releasefrom
chore/vscode-extension-e2e

Conversation

@joe-re

@joe-re joe-re commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 6 of the maintenance plan: VS Code extension packaging and end-to-end tests.

E2E tests (packages/client/test/e2e)

  • @vscode/test-electron launches VS Code with the extension from the repo root against a temporary workspace. The workspace's .vscode/settings.json configures a sqlite3 connection to a database created with node:sqlite.
  • Checks (inside the extension host):
    • sqlint diagnostics are published for a .sql file
    • completion returns keywords and the table read from sqlite through node:sqlite in Electron
    • extension.fixAllFixableProblems rewrites the document
  • A small built-in runner is used instead of mocha (3 tests, no extra deps)
  • pnpm test:vscode builds everything and runs them; VSCODE_VERSION selects the VS Code version
  • New CI job vscode-e2e runs on 1.101.0 (the engines.vscode minimum) and stable under xvfb-run, then builds the .vsix

Packaging

  • Added @vscode/vsce 4 as a devDependency
  • vscode:package / vscode:publish use --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)
  • .vscodeignore is now an allowlist. The .vsix contains only extension.js, vscodeExtensionServer.js, package.json, README.md and LICENSE (1.14 MB)

Test plan

  • pnpm test:vscode locally on VS Code 1.101.0 and 1.139.1 (stable): 3/3 passed
  • Negative check: with the server bundle removed, all 3 tests fail (timeouts), so the suite does not pass vacuously
  • pnpm vscode:package produces a .vsix with only the files above
  • build / lint / typecheck / all unit tests

- 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
@joe-re
joe-re merged commit 998cc14 into release Sep 25, 2026
5 checks passed
@joe-re
joe-re deleted the chore/vscode-extension-e2e branch September 25, 2026 17:34
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