Skip to content

chore(control-plane): move tests out of src/ into tests/ - #1850

Merged
nicoloboschi merged 1 commit into
mainfrom
chore/move-tests-out-of-src
May 29, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
chore/move-tests-out-of-src

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Summary

  • Move all 5 Vitest test files from hindsight-control-plane/src/**/*.test.ts to a sibling hindsight-control-plane/tests/ tree that mirrors the source layout. Keeps test code out of the directory that ships in the standalone build.
  • Switch relative test imports (./base-path, ./session, ./route, ./sdk-response) to the existing @/ alias so tests don't have to track their own depth.
  • Update vitest.config.ts include glob to tests/**/*.test.ts.
  • messages.test.ts resolves its catalog dir relative to src/messages/ (the catalogs themselves are still source).

Originally stacked on #1848; that has merged, so this is now a pure rename diff against main. Replaces the auto-closed PR #1849.

Test plan

  • npx vitest run — all 5 files, 65 tests pass.
  • ./scripts/hooks/lint.sh — clean.

Vitest test files lived next to the modules they covered (src/**/*.test.ts),
which mixes test code into the source tree that ships in the standalone build.
Move them to a sibling tests/ directory mirroring the src/ layout and update
the vitest include glob accordingly.

Relative imports inside the moved files (./base-path, ./session, ./route, etc.)
are switched to the existing @/ alias so the tests don't have to know their own
depth. The messages test resolves its catalog dir relative to src/messages.
@nicoloboschi
nicoloboschi merged commit ed82801 into main May 29, 2026
63 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.

1 participant