fremtind_rules_vitest 0.2.1Latest published 2.2y ago
MODULE.bazel
bazel_dep(name = "fremtind_rules_vitest", version = "0.2.1")
README

Bazel rules for vitest

Runs tests with the https://vitest.dev/ test runner under Bazel.

rules_vitest is forked from rules_jest by https://aspect.dev

Installation

From the release you wish to use: https://github.com/fremtind/rules_vitest/releases copy the WORKSPACE snippet into your WORKSPACE file.

Usage

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 /WORKSPACE file in the root of this repo.

Troubleshooting and common challenges

⚠️ vite, vitest, react (optional), jsdom (optional) must be installed at root ⚠️ We have not figured out why yet, but it seems to be an issue with ESM imports under Bazel

For troubleshooting and common challenges, see docs/troubleshooting.md.

About

Bazel rules to run tests using https://vitest.dev/

@fremtind/rules_vitest@fremtind

Languages

JavaScript29.4%
Shell3.6%
TypeScript0.1%

Maintainers

@hjellek
@tempacc21
@Saegrov

Versions

0.2.1 +2d2024-08-19
0.2.02024-08-16