Skip to content

chore(testing): slim testing/ to only what can't be colocated - #489

Merged
Juliusolsson05 merged 1 commit into
mainfrom
chore/testing-folder-cleanup
Jul 7, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
chore/testing-folder-cleanup

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

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 harness
  • testing/**/testingStack.*.test.ts — the "does the vitest stack boot" smoke trio (served its purpose)
  • testing/unit/shared/asRecord.test.ts — duplicate of the colocated one
  • 3 dead testing: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}/ (test claude-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

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>
@Juliusolsson05
Juliusolsson05 merged commit c235205 into main Jul 7, 2026
@Juliusolsson05
Juliusolsson05 deleted the chore/testing-folder-cleanup branch July 7, 2026 21:51
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