Repository navigation
chore(testing): slim testing/ to only what can't be colocated - #489
Merged
Merged
Conversation
The testing/ folder had accreted across four eras and grown cruft. Swept it:
DELETED (superfluous):
- testing/ghost-demo/ — an unreferenced 2026-04 manual demo harness (self-refs only)
- testing/{unit,renderer,integration}/testingStack.*.test.ts — the "does the
vitest stack boot" smoke trio from the ground-zero test-stack PR; served its
purpose, tests no real product code
- testing/unit/shared/asRecord.test.ts — duplicate of the colocated
src/shared/lib/asRecord.test.ts (equivalent coverage)
- 3 dead `testing:rendering*` package.json scripts + the `**/testing/rendering/**`
vitest exclude — all pointed at testing/rendering/, deleted in an earlier cleanup
COLOCATED (finishing the __tests__ job from #482 — pure git mv, tests import via
@shared/@Renderer aliases so no path fixes):
- numstat, providerKind, performanceSerialization, sanitizePath(projectDir),
applyPromptSuggestionToRuntime → next to their source under src/
(applyPromptSuggestion's literal dropped untyped {cwd,kind} extras the web
tsconfig now checks once colocated)
KEPT (genuinely can't colocate):
- testing/fixtures/ — the rendering corpus (bundleCorpus/recordingCorpus read it)
- testing/setup/renderer.ts — the renderer project's happy-dom setup file
- testing/unit/{channels,proxy}/ — tests for claude-code-headless, a git submodule
(a test file can't live inside a submodule from this repo)
vitest.config: dropped the empty testing/integration + testing/renderer include
globs (kept testing/unit/** for the submodule tests). README rewritten to state
the colocate-by-default rule and why the survivors are exceptions.
Gates: tsc node+web clean; unit 429, renderer 14, integration 28 — all green
(the lower renderer/integration counts are exactly the deleted smoke tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The
testing/folder had accreted cruft across four eras. This sweeps it so what's left is only the things that genuinely can't live next to their source.Deleted (superfluous):
testing/ghost-demo/— unreferenced 2026-04 demo harnesstesting/**/testingStack.*.test.ts— the "does the vitest stack boot" smoke trio (served its purpose)testing/unit/shared/asRecord.test.ts— duplicate of the colocated onetesting:rendering*npm scripts + the**/testing/rendering/**vitest exclude (folder was already deleted)Colocated (finishing #482's job — pure
git mv, alias imports need no fixes):numstat,providerKind,performanceSerialization,sanitizePath,applyPromptSuggestionToRuntime→ next to their source.Kept (can't colocate):
fixtures/(the rendering corpus),setup/renderer.ts(vitest setup),unit/{channels,proxy}/(testclaude-code-headless, a submodule).−675 net lines. Gates: tsc node+web clean; unit 429, renderer 14, integration 28 — all green (lower renderer/integration counts = the deleted smoke tests).
🤖 Generated with Claude Code