Skip to content

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

Closed
nicoloboschi wants to merge 1 commit into
fix/login-returnto-open-redirectfrom
chore/move-tests-out-of-src
Closed

nicoloboschi wants to merge 1 commit into
fix/login-returnto-open-redirectfrom
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).

Stacked on #1848 so the new sanitizeReturnTo tests come along for the ride. GitHub will retarget the base to main once #1848 merges; the diff against main will then reduce to just the move.

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.
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