You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
### Features
4
4
5
5
-`[jest-changed-files]` Support Sapling ([#13941](https://github.com/facebook/jest/pull/13941))
6
+
-`[jest-circus, @jest/cli, jest-config]` Add feature to randomize order of tests via CLI flag or through the config file([#12922](https://github.com/facebook/jest/pull/12922))
6
7
-`[jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types]` Add `workerThreads` configuration option to allow using [worker threads](https://nodejs.org/dist/latest/docs/api/worker_threads.html) for parallelization ([#13939](https://github.com/facebook/jest/pull/13939))
7
8
-`[jest-config]` Add `openHandlesTimeout` option to configure possible open handles warning. ([#13875](https://github.com/facebook/jest/pull/13875))
8
9
-`[@jest/create-cache-key-function]` Allow passing `length` argument to `createCacheKey()` function and set its default value to `16` on Windows ([#13827](https://github.com/facebook/jest/pull/13827))
Copy file name to clipboardExpand all lines: docs/CLI.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,6 +332,22 @@ If configuration files are found in the specified paths, _all_ projects specifie
332
332
333
333
:::
334
334
335
+
### `--randomize`
336
+
337
+
Shuffle the order of the tests within a file. The shuffling is based on the seed. See [`--seed=<num>`](#--seednum) for more info.
338
+
339
+
Seed value is displayed when this option is set. Equivalent to setting the CLI option [`--showSeed`](#--showseed).
340
+
341
+
```bash
342
+
jest --randomize --seed 1234
343
+
```
344
+
345
+
:::note
346
+
347
+
This option is only supported using the default `jest-circus` test runner.
348
+
349
+
:::
350
+
335
351
### `--reporters`
336
352
337
353
Run tests with specified reporters. [Reporter options](configuration#reporters-arraymodulename--modulename-options) are not available via CLI. Example with multiple reporters:
0 commit comments