microsoft / microsoft/vscode-documentdb
Clean up legacy vscode-test integration test infrastructure (pre task for new e2e framework)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Context
PR #647 deprecated npm run test by replacing it with a no-op that prints a deprecation notice. That was intentionally the smallest possible first step: it stops the dead legacy suite from running, but leaves all of the surrounding files and dependencies in place so the change is easy to revert.
This issue tracks the full removal of the legacy vscode-test based integration test infrastructure. It is a pre task for the new e2e testing framework planned for the 0.10.0 release. Doing the cleanup first gives the new framework a clean slate to land into.
Please read PR #647 first to understand the current state of package.json before starting on this work.
Goals
- Remove all code, config, and dependencies tied to the old
vscode-test+ Mocha integration suite. - Leave Jest tests (
npm run jesttest) completely untouched. - Keep
npm run testworking but unblock it from being either repurposed or fully removed once the new e2e harness is ready.
Things to remove
1. Source / test files
- Delete the
test/directory and all its*.test.tssources (the Mocha integration tests). - Delete any
out/test/build artifacts (these are generated, but verify nothing references them). - Search for stray references to removed test helpers (
TestActionContext,TestOutputChannel,TestUserInput,runWithSetting,global.test.ts, etc.) and clean up imports.
2. Configuration
- Delete
.vscode-test.js. - Remove the
Integration Testslaunch configuration entry from.vscode/launch.json(if present). - Remove any
tasks.jsonentries that invokevscode-testor build thetest/folder. - Update
tsconfig.jsonto droptest/fromincludeif it is listed there. Confirmnpm run buildstill compiles without it. - Update
eslint.config.mjsto drop anytest/specific overrides (mocha plugin rules, etc.). - Update
extension.bundle.tsif it pulls anything fromtest/.
3. package.json cleanup
- Replace the temporary deprecation
node -eone liner in thetestscript with either a full removal of the script or a forwarding alias (final decision belongs to whoever lands the new e2e framework). - Remove the following devDependencies (verify with
npm ls <pkg>that nothing else depends on them in this workspace):@vscode/test-cli@vscode/test-electron@types/mochamochamocha-junit-reportermocha-multi-reporterseslint-plugin-mocha
- Run
npm installand commit the resultingpackage-lock.jsonupdate.
4. CI / pipelines
- Audit
.github/workflows/*.ymland any Azure DevOps pipelines for steps that invokenpm run test,vscode-test, JUnit reporter outputs attest-results.xml, or download VS Code for headless test runs. Remove or update them. - Confirm
npm run jestteststill runs in CI and gates merges.
5. Documentation
- Search
docs/,CONTRIBUTING.md, and the README for instructions that reference the old integration test workflow. Update or remove them. - Add a short note in the contributing docs pointing readers at Jest (
npm run jesttest) until the new e2e framework is in place.
Acceptance criteria
npm run jesttestpasses locally and in CI.npm run build,npm run lint,npm run prettier-fix, andnpm run l10nall succeed.git grep -i vscode-testreturns no remaining hits in source, configs, docs, or CI.node_modules/@vscode/test-cliandnode_modules/@vscode/test-electronare no longer installed after a cleannpm install.- No references remain to Mocha or to the JUnit
test-results.xmlartifact.
Related
- PR #647 (deprecation, first step)
- Follow up: new e2e testing framework (separate issue / PR, 0.10.0)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read PR #647 and inspect package.json first, then audit test/, .vscode-test.js, .vscode/launch.json, tasks.json, tsconfig.json, eslint.config.mjs, extension.bundle.ts, workflows, pipelines, and documentation for the listed references. Run npm ls for the dependencies before removing them and use git grep -i vscode-test to guide the cleanup. Done means the listed build, lint, formatting, localization, and Jest commands pass, with no legacy Mocha, vscode-test, or JUnit references remaining.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript, vscode
- Domain
- build-system, ci-cd, devtools, documentation, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100