Move all tests under test/ mirroring src layout - #27
Merged
Conversation
Centralize Vitest discovery, add @test path alias, and include test files in typecheck and lint.
rafaeelricco
marked this pull request as ready for review
May 22, 2026 22:00
There was a problem hiding this comment.
Critical correctness scan
Reviewed PR #27 (19ffd65) and the parent Vitest refactor (#26, 3f777b8). Scope is test layout, path aliases, and config updates only; no src/ production logic changed in this PR.
Checks run: pnpm test (69 passed), pnpm typecheck, pnpm build.
Findings: No critical correctness issues. The prior import-time CONFIG_DIR/CONFIG_FILE hazard from #26 is already addressed via lazy configDir()/configFile() plus per-test COMMIT_TOOLS_HOME in test/setup.ts.
Below critical bar (not actionable here): Bare commit-tools now defaults to generate instead of help (#26, documented in --help).
Sent by Cursor Automation: Find critical bugs
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.


Motivation
Tests were co-located next to source files under
src/, while helpers and smoke tests already lived intest/. This PR consolidates every test undertest/with a layout that mirrorssrc/, so test discovery and tooling config stay in one place.What's New
Test layout
src/**/*.test.tsfiles intotest/(cli/,domain/,infra/,libs/)test/cli/smoke.test.tsTooling
test/**/*.test.ts@test/alias for shared helpers such asrun-futureandtemp-git-repotest/**/*in TypeScript typecheck and ESLint coverageTest fixes
@test/helpers/*tsc(e.g.Future.resolve(undefined),Success/Failurenarrowing)Testing & Feedback
pnpm teststill reports 20 files / 73 testspnpm typecheckandpnpm run lint:cipassdist/index.jsfrom the new pathIf you find any bugs or have recommendations for improvements, please open an issue and assign it to me.