Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/jest_test.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions jest/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def jest_test(

config: "Optional Jest config file. See https://jestjs.io/docs/configuration.

Supported config file types are ".js", ".cjs", ".mjs", ".json" which come from https://jestjs.io/docs/configuration
minus TypeScript since we this rule extends from the configuration. TypeScript jest configs should be transpiled
before being passed to jest_test with [rules_ts](https://github.com/aspect-build/rules_ts).
Supported config file types are ".js", ".cjs", ".mjs", ".ts", ".cts", ".json" which come from https://jestjs.io/docs/configuration.
TypeScript jest configs can either be transpiled before being passed to jest_test with
[rules_ts](https://github.com/aspect-build/rules_ts), or loaded natively with Node's
[type stripping](https://nodejs.org/en/learn/typescript/run-natively) functionality.

data: Runtime dependencies of the Jest test.

Expand Down
2 changes: 1 addition & 1 deletion jest/private/jest_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//lib:paths.bzl", "paths")

_attrs = dicts.add(js_binary_lib.attrs, {
"config": attr.label(allow_single_file = [".js", ".cjs", ".mjs", ".json"]),
"config": attr.label(allow_single_file = [".js", ".cjs", ".mjs", ".ts", ".cts", ".json"]),
"auto_configure_reporters": attr.bool(default = True),
"auto_configure_test_sequencer": attr.bool(default = True),
"run_in_band": attr.bool(default = True),
Expand Down