refactor(vscode): split tests out of src into sibling tests/ and e2e/ trees - #7
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eef7bebd3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… trees The unit suites lived next to the modules they cover, which put test files and one test fixture inside the tree that produces the published bundle, and put the E2E harness a level deeper than it needed to be. The package now has three siblings: src/ is source only, tests/ mirrors it with the Rstest suites, and e2e/ holds the extension-host suites. Nothing about what the tests assert changed — only where they live and the paths that reach them. Rstest and tsconfig already listed the destination, so the moves are the smaller half of the diff; the rest is the paths that were depth-sensitive. Every harness climbs one fewer level out of tests-dist/ now, so runTest and the fixture roots lose a '..' each, and both the config globs and the gitignore rules that keep fixture installs untracked follow the trees to their new homes.
The E2E tsconfig listed `src/shell/detection.ts` and `src/shell/types.ts`, a path that has never existed here — the shell's modules sit directly under `src/`. tsc ignores an include pattern that matches nothing as long as another pattern matches, so the entry was silently inert and the suites compiled anyway: tsc reaches those modules through the imports in the suites that use them. Verified by removing tests-dist and rebuilding: `tests-dist/src/detection.js` and the rest still emit, and the vscode suite passes.
The ignore existed to keep the E2E fixtures' pinned toolchain versions out of automated bumps, which is a manual, E2E-verified decision. It named packages/vscode/tests/**, where those fixtures used to live; all six manifests are now under packages/vscode/e2e/** and the old path holds no manifest at all, so the rule was matching nothing.
fi3ework
force-pushed
the
chore/unit-tests-out-of-src
branch
from
August 7, 2026 08:41
08cd1ba to
631b16a
Compare
The repository is about to be public, so the landing page needs to say what state the project is in before a reader forms an expectation from the feature list. Names it concretely — pre-1.0, settings and command ids can still move, not every config source is wired up — and points at the roadmap table already below it rather than restating what works.
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.
What
Stacked on #6. Pure relocation — no test changed what it asserts.
The unit suites sat next to the modules they cover, so
src/(the tree that produces the published bundle) also held 17 test files and a text fixture, and the E2E harness sat one level deeper than it needed to. The package now has three siblings:rstest.config.mtsandtsconfig.jsonalready named the destination, so the moves themselves were the easy half. The rest is everything that was depth-sensitive:src/lose one..intests/, and one more ine2e/(both trees came up a level).tests-dist/—runTest.tsx3 and the rstestFIXTURES_ROOTeach drop a.., and the compiled entry points move fromtests-dist/tests/e2e/...totests-dist/e2e/....rstack.config.ts, the playground fixture list in.vscode/launch.json, and one CI comment..gitignorekept fixture installs untracked through four rules under the old path. They stopped matching the moment the tree moved, which surfaced as fixture lockfiles turning up untracked; they now point ate2e/.src/stacks/fmt/stubProcess.tsmoves with the suites that use it — it was always test-only scaffolding, never a build entry.src/stacks/test/parse.fixture.txtmoves for the same reason; it was the one non-.tsfile undersrc/.The second commit removes an include from
tsconfig.e2e.jsonthat pointed atsrc/shell/detection.tsandsrc/shell/types.ts, a path this package has never had. tsc ignores a non-matching include pattern when another one matches, so it was inert: the suites always reached those modules through their own imports.Test plan
Every gate run locally against the new layout, with
tests-dist/deleted first so no stale compile could mask a broken path:pnpm lint— 0 errors, 0 type errors.pnpm test:unit— 19 files, 165 passing, the same set as before the move.pnpm build— clean.__dirnameclimb changed:test:e2e:smoke,test:e2e:vscode,test:e2e:rstest:run,test:e2e:lint:run(8 suites).Fixture file contents are byte-identical — they were renamed, never rewritten, and the pre-commit
rs fmtskips them through the ignore globs.Checklist