Skip to content

Conversation

AlexMcFarland
Copy link

Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: no

TypeScript Jest configuration files can be parsed using Node's type stripping functionality.
.mts has been omitted as it is not supported by Jest.

Closes #229

Test plan

  • Manual testing;

If on Node version >= 22.6.0, < 23.6.0, run a jest_test target with a .ts or .cts config file with:

env = {
    "NODE_OPTIONS": "--experimental-strip-types",
},

Node versions >= 23.6.0 should just work, as type stripping is enabled by default.
Node versions < 22.6.0 do not have type stripping support.

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

aspect-workflows bot commented Sep 9, 2025

Test

52 test targets passed

Targets
//:case3 [k8-fastbuild]                                          4s
//docs:update_test [k8-fastbuild]                                151ms
//example/(simple_group):cjs_config_test [k8-fastbuild]          5s
//example/(simple_group):gen_config_test [k8-fastbuild]          5s
//example/(simple_group):js_config_test [k8-fastbuild]           5s
//example/(simple_group):json_config_test [k8-fastbuild]         6s
//example/(simple_group):mjs_config_test [k8-fastbuild]          5s
//example/(simple_group):other_target_config_test [k8-fastbuild] 5s
//example/(simple_group):target_config_test [k8-fastbuild]       5s
//example/(simple_group):test [k8-fastbuild]                     5s
//example/(simple_group):test_user_data [k8-fastbuild]           5s
//example/custom_reporters:case1_test [k8-fastbuild]             5s
//example/custom_reporters:case2_test [k8-fastbuild]             5s
//example/custom_sequencer:case1_test [k8-fastbuild]             12s
//example/custom_sequencer:case2_test [k8-fastbuild]             10s
//example/custom_snapshot_resolver:test [k8-fastbuild]           8s
//example/custom_snapshot_resolver_files:test [k8-fastbuild]     6s
//example/esm:test [k8-fastbuild]                                5s
//example/esm_transform:test [k8-fastbuild]                      6s
//example/esm_type_module:test [k8-fastbuild]                    5s
//example/multiple_snapshots:test [k8-fastbuild]                 7s
//example/sharding:test [k8-fastbuild]                           10s
//example/simple:cjs_config_test [k8-fastbuild]                  6s
//example/simple:gen_config_test [k8-fastbuild]                  6s
//example/simple:js_config_test [k8-fastbuild]                   5s
//example/simple:json_config_test [k8-fastbuild]                 5s
//example/simple:mjs_config_test [k8-fastbuild]                  5s
//example/simple:other_target_config_test [k8-fastbuild]         5s
//example/simple:target_config_test [k8-fastbuild]               5s
//example/simple:test [k8-fastbuild]                             5s
//example/simple:test_user_data [k8-fastbuild]                   5s
//example/snapshots:test [k8-fastbuild]                          7s
//example/snapshots_files:test [k8-fastbuild]                    7s
//jest/tests/case10:test [k8-fastbuild]                          5s
//jest/tests/case10a:test [k8-fastbuild]                         5s
//jest/tests/env_inherit:test [k8-fastbuild]                     5s
//jest/tests/fixed_args:fixed_args_test [k8-fastbuild]           923ms
//jest/tests/fixed_args:test [k8-fastbuild]                      4s
//jest/tests/package_json_module:test [k8-fastbuild]             8s
//jest/tests:case1 [k8-fastbuild]                                5s
//jest/tests:case11a [k8-fastbuild]                              5s
//jest/tests:case11b [k8-fastbuild]                              5s
//jest/tests:case12 [k8-fastbuild]                               5s
//jest/tests:case13 [k8-fastbuild]                               5s
//jest/tests:case14 [k8-fastbuild]                               5s
//jest/tests:case2a [k8-fastbuild]                               4s
//jest/tests:case2b [k8-fastbuild]                               5s
//jest/tests:case5 [k8-fastbuild]                                4s
//jest/tests:case6 [k8-fastbuild]                                5s
//jest/tests:case7 [k8-fastbuild]                                5s
//jest/tests:case8 [k8-fastbuild]                                5s
//jest/tests:case9 [k8-fastbuild]                                5s

Total test execution time was 4m 37s. 13 tests (20.0%) were fully cached saving 814ms.


Buildifier      Format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]: Support TypeScript for Jest Config Files
2 participants