Skip to content

feat: add e2e testing with @vscode/test-cli and wire it into CI - #60

Merged
Wikid82 merged 2 commits into
developmentfrom
feature/e2e-integration-tests
Aug 21, 2026
Merged

feat: add e2e testing with @vscode/test-cli and wire it into CI#60
Wikid82 merged 2 commits into
developmentfrom
feature/e2e-integration-tests

Conversation

@Wikid82

@Wikid82 Wikid82 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a real integration-testing layer alongside the vitest unit suite: test/e2e/*.test.ts runs against the built extension inside an actual VS Code Extension Development Host (@vscode/test-cli + @vscode/test-electron), exercising command registration, the tree view, and workspaceState through the real vscode API instead of test/vscode-mock.ts.
  • activate() now returns a small { store, provider } API so e2e tests can inspect state the tree view UI alone doesn't expose.
  • npm run test:e2e (pretest:e2e builds the extension + bundles test/e2e/** with esbuild, then vscode-test launches the real test host).
  • New e2e CI job (xvfb-run on Linux) runs it on every push/PR alongside the existing build job.
  • Updates the Definition of Done in CLAUDE.md: new user-facing commands/tree behavior now need an e2e test in addition to unit tests, not instead of them.
  • Overrides mocha's stale diff/serialize-javascript transitive deps (pulled in by @vscode/test-cli) to close a high-severity npm audit finding neither package has released a compatible fix for yet.

Test plan

  • npm run lint
  • npm run test:coverage — 100% statements/lines, 93.02% branches
  • npm run build
  • npm run test:e2e — 4/4 passing against a real VS Code 1.134.0 instance
  • npm audit --audit-level=high — 0 vulnerabilities
  • scripts/local-patch-report.sh — 100% patch coverage (1/1)

Adds a real integration-testing layer alongside the vitest unit
suite: test/e2e/*.test.ts runs against the built extension inside an
actual VS Code Extension Development Host (@vscode/test-cli +
@vscode/test-electron), exercising command registration, the tree
view, and workspaceState through the real vscode API instead of the
vitest mock. activate() now returns a small { store, provider } API
so e2e tests can inspect state the UI alone doesn't expose.

Wires `npm run test:e2e` into a new CI job (xvfb-run on Linux), and
updates the Definition of Done in CLAUDE.md to require e2e coverage
for new user-facing commands/tree behavior alongside unit tests, not
as a substitute for them.

Also overrides mocha's stale diff/serialize-javascript transitive
deps to close a high-severity npm audit finding pulled in by
@vscode/test-cli.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Wikid82
Wikid82 merged commit fb65195 into development Aug 21, 2026
7 checks passed
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