Skip to content

test: migrate to vitest and colocate tests#58

Merged
gnapse merged 2 commits into
nextfrom
ernesto/vitest-colocate-tests
May 21, 2026
Merged

test: migrate to vitest and colocate tests#58
gnapse merged 2 commits into
nextfrom
ernesto/vitest-colocate-tests

Conversation

@gnapse
Copy link
Copy Markdown

@gnapse gnapse commented May 21, 2026

This migrates the repo from Jest to Vitest, adding a jsdom-based Vitest config and updating the test scripts and dependencies.

It also removes the root __test__ unit-test layout by colocating the parser and interpolate suites with the modules they cover.

The built-package smoke and ESM/CJS type-consumer checks are kept, but moved into package-checks/ because they validate publish-time package contracts rather than source-level behavior.

Reference

@gnapse gnapse marked this pull request as ready for review May 21, 2026 21:03
@gnapse gnapse self-assigned this May 21, 2026
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully migrates the testing framework from Jest to Vitest and improves project organization by colocating unit tests with their respective modules. These updates streamline the test configuration and nicely separate source-level behavior from package-level publish checks. A few adjustments have been noted regarding a broken oxlint override caused by the file reorganization, alongside some suggested refinements to test helpers, React rendering patterns, and the placement of global cleanup hooks to optimize test execution.

Share FeedbackReview Logs

Comment thread src/interpolate.test.tsx Outdated
Comment thread src/interpolate.test.tsx Outdated
Comment thread src/parser.test.ts
Comment thread src/interpolate.test.tsx Outdated
Comment thread vitest.setup.ts Outdated
@gnapse gnapse requested review from a team and nvignola and removed request for a team May 21, 2026 21:16
@gnapse gnapse merged commit 4f5e569 into next May 21, 2026
2 checks passed
@gnapse gnapse deleted the ernesto/vitest-colocate-tests branch May 21, 2026 21:17
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.

2 participants