Runs tests with the https://vitest.dev/ test runner under Bazel.
rules_vitest is forked from rules_jest by https://aspect.dev
From the release you wish to use:
https://github.com/fremtind/rules_vitest/releases
copy the WORKSPACE snippet into your WORKSPACE file.
Run all Vitest tests in the workspace: bazel test --test_lang_filters=vitest //...
See vitest_test API documentation and the example usages in the example folder.
Note that the example also relies on code in the
/WORKSPACEfile in the root of this repo.
vite, vitest, react (optional), jsdom (optional) must be installed at root
For troubleshooting and common challenges, see docs/troubleshooting.md.