Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
format
  • Loading branch information
rluvaton committed Jul 3, 2023
commit 0625b75c6d78e70458461521fa5556084ddfe17c
5 changes: 3 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1510,11 +1510,12 @@ Test suite shard to execute in a format of `<index>/<total>`, where

`index` is a positive integer, index of divided parts
`total` is a positive integer, total of divided part
This command will divide all tests files into `total` equal parts, and will run only those that happen to be in an `index` part.
This command will divide all tests files into `total` equal parts,
and will run only those that happen to be in an `index` part.

For example, to split your tests suite into three parts, use this:

```sh
```bash
node --test --shard=1/3
node --test --shard=2/3
node --test --shard=3/3
Expand Down
8 changes: 4 additions & 4 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,10 @@ changes:
**Default:** `Infinity`.
* `watch` {boolean} Whether to run in watch mode or not. **Default:** `false`.
* `shards` {Object} Running tests in a specific shard. **Default:** `undefined`.
* `index` {number} is a positive integer between 1 and `<total>` that specifies the index of the shard to run.
This option is _required_.
* `total` {number} is a positive that specifies the total number of shards to split the test files to.
This option is _required_.
* `index` {number} is a positive integer between 1 and `<total>`
that specifies the index of the shard to run. This option is _required_.
* `total` {number} is a positive integer that specifies the total number
of shards to split the test files to. This option is _required_.
* Returns: {TestsStream}

```mjs
Expand Down