Skip to content

Run tests with vitest - #67

Merged
webdevred merged 1 commit into
masterfrom
run-tests-with-vitest
Oct 11, 2026
Merged

webdevred merged 1 commit into
masterfrom
run-tests-with-vitest

Conversation

@webdevred

Copy link
Copy Markdown
Owner

This replaces node:test with vitest. I want the same test runner in all my JavaScript projects and vitest is the one I picked. The four tests are the same apart from the import: each one still starts dist/index.js as a separate process against a fixture in examples/.

The test file is renamed to action.test.mjs because vitest only collects files named *.test.* or *.spec.* by default. This also rewrites the Testing section of CLAUDE.md, which said that no unit test framework should be added.

The lockfile only adds vitest and its dependencies. The packages already there keep their versions.

I want one test runner across my JavaScript projects and picked vitest. test.mjs becomes action.test.mjs because vitest only collects files named *.test.* or *.spec.* by default.
@webdevred
webdevred merged commit 5328ae2 into master Oct 11, 2026
2 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