generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the current behavior?
Jest provides a config option cacheDirectory which specifies where intermediate file system outputs are written such as transformations or haste map. If left unspecified, the default is approximately ${os.tmpdir()}/jest_${process.uid}
. The contents of this directory are not deleted when jest exits and files are written even when --no-cache
is set.
Describe the feature
Bazel's TEST_TMPDIR should be integrated to set the jest cacheDirectory in the generated configuration.
- TEST_TMPDIR in Bazel is available to every test action as an ENV. The directory is writable, guaranteed to be empty, and unique to a given test target.
- This enforces hermeticity at the file system level between different jest_test targets and brings rules_jest more in line with the bazel test specification.
- TEST_TMPDIR can either be provided via CLI flag via "make variable" expansion or set in the generated config template by reading from
process.env
.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request