Skip to content

Commit 4e5221b

Browse files
committed
fixup! test_runner: support typescript files in default glob
1 parent 0a4f389 commit 4e5221b

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

doc/api/test.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,22 @@ node --test
422422

423423
By default, Node.js will run all files matching these patterns:
424424

425-
* `**/*.test.?(c|m)js`
426-
* `**/*-test.?(c|m)js`
427-
* `**/*_test.?(c|m)js`
428-
* `**/test-*.?(c|m)js`
429-
* `**/test.?(c|m)js`
430-
* `**/test/**/*.?(c|m)js`
425+
* `**/*.test.{cjs,mjs,js}`
426+
* `**/*-test.{cjs,mjs,js}`
427+
* `**/*_test.{cjs,mjs,js}`
428+
* `**/test-*.{cjs,mjs,js}`
429+
* `**/test.{cjs,mjs,js}`
430+
* `**/test/**/*.{cjs,mjs,js}`
431+
432+
When [`--experimental-strip-types`][] is supplied, the following
433+
additional patterns are matched:
434+
435+
* `**/*.test.{cts,mts,ts}`
436+
* `**/*-test.{cts,mts,ts}`
437+
* `**/*_test.{cts,mts,ts}`
438+
* `**/test-*.{cts,mts,ts}`
439+
* `**/test.{cts,mts,ts}`
440+
* `**/test/**/*.{cts,mts,ts}`
431441

432442
Alternatively, one or more glob patterns can be provided as the
433443
final argument(s) to the Node.js command, as shown below.
@@ -3562,6 +3572,7 @@ added:
35623572
Can be used to abort test subtasks when the test has been aborted.
35633573

35643574
[TAP]: https://testanything.org/
3575+
[`--experimental-strip-types`]: cli.md#--experimental-strip-types
35653576
[`--experimental-test-coverage`]: cli.md#--experimental-test-coverage
35663577
[`--experimental-test-module-mocks`]: cli.md#--experimental-test-module-mocks
35673578
[`--experimental-test-snapshots`]: cli.md#--experimental-test-snapshots

0 commit comments

Comments
 (0)