aspect-build/rules_jest

Bazel rules to run tests using https://jestjs.io

24

stars

306

commits

Starlark

primary language

Jul 29, 2026

updated

bazel
bazel-rules

README

Bazel rules for jest

[!NOTE] This repository uses the Aspect CLI for CI and local development. See the docs and install instructions to get started.

Runs tests with the https://jestjs.io/ test runner under Bazel.

Many companies are successfully testing with rules_jest. If you're getting value from the project, please let us know! Just comment on our Adoption Discussion.

rules_jest is just a part of what Aspect provides:

Installation

Follow instructions from the release you wish to use: https://github.com/aspect-build/rules_jest/releases

Usage

Run all Jest tests in the workspace: bazel test --test_lang_filters=jest //...

Filter tests by file path: bazel test --test_filter="user" //my:test (uses Jest's testRegex)

See jest_test API documentation and the example usages in the example folder.

Note that the example also relies on code in the /MODULE.bazel file in the root of this repo.

Troubleshooting and common challenges

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

Contributors

gregmagolan

180 commits

jbedard

48 commits

alexeagle

36 commits

renovate[bot]

19 commits

aspect-build/rules_jest

Bazel rules to run tests using https://jestjs.io

24

stars

306

commits

Starlark

primary language

Jul 29, 2026

updated

bazel
bazel-rules

README

Bazel rules for jest

[!NOTE] This repository uses the Aspect CLI for CI and local development. See the docs and install instructions to get started.

Runs tests with the https://jestjs.io/ test runner under Bazel.

Many companies are successfully testing with rules_jest. If you're getting value from the project, please let us know! Just comment on our Adoption Discussion.

rules_jest is just a part of what Aspect provides:

Installation

Follow instructions from the release you wish to use: https://github.com/aspect-build/rules_jest/releases

Usage

Run all Jest tests in the workspace: bazel test --test_lang_filters=jest //...

Filter tests by file path: bazel test --test_filter="user" //my:test (uses Jest's testRegex)

See jest_test API documentation and the example usages in the example folder.

Note that the example also relies on code in the /MODULE.bazel file in the root of this repo.

Troubleshooting and common challenges

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

Contributors

gregmagolan

180 commits

jbedard

48 commits

alexeagle

36 commits

renovate[bot]

19 commits

Languages

Starlark

56.0%

JavaScript

40.9%

Shell

3.1%