diff --git a/doc/api/cli.md b/doc/api/cli.md index 31ed14ce2730e4..f1124ab9cdaddd 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1289,6 +1289,27 @@ added: v18.0.0 Configures the test runner to only execute top level tests that have the `only` option set. +### `--test-shard` + + + +Test suite shard to execute in a format of `/`, 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. + +For example, to split your tests suite into three parts, use this: + +```bash +node --test --test-shard=1/3 +node --test --test-shard=2/3 +node --test --test-shard=3/3 +``` + ### `--throw-deprecation`