diff --git a/doc/api/test.md b/doc/api/test.md index 551259d314bb70..030f39aed12a4f 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -316,6 +316,29 @@ Otherwise, the test is considered to be a failure. Test files must be executable by Node.js, but are not required to use the `node:test` module internally. +## `runFiles([options])` + + + +* `options` {Object} Configuration options for running test files. The following + properties are supported: + * `concurrency` {number|boolean} If a number is provided, + then that many files would run in parallel. + If truthy, it would run (number of cpu cores - 1) + files in parallel. + If falsy, it would only run one file at a time. + If unspecified, subtests inherit this value from their parent. + **Default:** `true`. + * `files`: {Array} An array containing the list of files to run. + **Default** matching files from [test runner execution model][]. + * `signal` {AbortSignal} Allows aborting an in-progress test file. + * `timeout` {number} A number of milliseconds the test file will fail after. + If unspecified, subtests inherit this value from their parent. + **Default:** `Infinity`. +* Returns: {Promise} Resolved with `undefined` once all test files complete. + ## `test([name][, options][, fn])`