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: History.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,8 @@ QUnit 3.0 Roadmap and feedback: https://github.com/qunitjs/qunit/issues/1498
63
63
64
64
### Fixed
65
65
66
-
* CLI: Fix support for strict TAP parsers by limiting colors to test names. [#1801](https://github.com/qunitjs/qunit/pull/1801)
67
-
* CLI: Fix confusing `--seed` eating the file argument. [#1691](https://github.com/qunitjs/qunit/issues/1691)
66
+
* CLI: Fix support for strict [TAP parsers](https://qunitjs.com/api/config/reporters/#tap) by limiting colors to test names. [#1801](https://github.com/qunitjs/qunit/pull/1801)
* CLI: Remove confusing `expected: undefined` under error messages in TAP reporter. [#1794](https://github.com/qunitjs/qunit/pull/1794)
69
69
* HTML Reporter: Fix broken "Rerun without max depth" link. [da0c59e101](https://github.com/qunitjs/qunit/commit/da0c59e1016685ecd2b813bba914d33170e7bf98) (see also [91db92dbc5](https://github.com/qunitjs/qunit/commit/91db92dbc50bbbc41c5060a27e7aafd4e073e289), [73c03cf277](https://github.com/qunitjs/qunit/commit/73c03cf27745e179396a6d7c9af011a20d3b9082))
70
70
* HTML Reporter: Fix `<label>` to wrap `<select>` for multi-value urlConfig item. [#1773](https://github.com/qunitjs/qunit/pull/1773)
@@ -741,7 +741,7 @@ QUnit 3.0 Roadmap and feedback: https://github.com/qunitjs/qunit/issues/1498
741
741
* Core: Reintroduce `QUnit.config.module`.
742
742
* Core: Stop splitting URL parameter values by commas.
743
743
* Core: New `moduleId`-based filtering.
744
-
* Core: Support running tests in pseudo-random order.
744
+
* Core: Introduce `QUnit.config.seed` for running tests in pseudo-random order.
745
745
* Dump: Fix asymmetrical function dump argument spacing.
746
746
* HTML Reporter: Fix escaping of diffs.
747
747
* HTML Reporter: Add message explaining missing diff.
Copy file name to clipboardExpand all lines: docs/api/config/reorder.md
+4
Original file line number
Diff line number
Diff line change
@@ -29,3 +29,7 @@ Note that this feature may lead to unexpected failures if you have non-atomic te
29
29
This feature is limited to [browser environments](../../browser.md) by default, as it utilizes the `sessionStorage` API. Set [QUnit.config.storage](./storage.md) to enable this feature in Node.js or in other environments.
30
30
31
31
The QUnit reorder feature was inspired by Kent Beck, who designed a similar mechanism in JUnit Max for Eclipse. <sup>[[1]](https://topenddevs.com/podcasts/javascript-jabber/episodes/050-jsj-qunit-with-jorn-zaefferer)[[2]](https://www.youtube.com/watch?v=g9ykvSI0gjg)[[3]](https://web.archive.org/web/20141018095913/http://junitmax.com/)</sup>
Copy file name to clipboardExpand all lines: docs/api/config/seed.md
+12-4
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,21 @@ This option is also available as [CLI option](../../cli.md), and as URL query pa
28
28
29
29
</p>
30
30
31
-
When set to boolean true, or a string, QUnit will run tests in a [seeded-random order](https://en.wikipedia.org/wiki/Random_seed).
32
-
33
-
The provided string will be used as the seed in a pseudo-random number generator to ensure that results are reproducible. The randomization will also respect the [reorder](./reorder.md) option if enabled and re-run failed tests first without randomizing them.
31
+
When enabled QUnit will run tests in a [seeded-random order](https://en.wikipedia.org/wiki/Random_seed).
34
32
35
33
Randomly ordering your tests can help identify non-atomic tests which either depend on a previous test or are leaking state to subsequent tests.
36
34
37
-
If `seed` is boolean true (or set as URL query parameter without a value), then QUnit will generate on-demand a new random value to use as seed. You can then read the seed from `QUnit.config.seed` at runtime, and use it to reproduce the same test sequence later.
35
+
The provided string will be used as the seed in a pseudo-random number generator to ensure that results are reproducible. The randomization will respect the [reorder](./reorder.md) option if enabled, such that previously failed tests still run first instead of being shuffled.
36
+
37
+
If `seed` is set to `true` (or add `?seed` to the URL, without any value), then QUnit will generate a new random seed every time you run the tests. To reproduce a specific random sequence, access the seed from `QUnit.config.seed` via the console.
38
+
39
+
## Changelog
40
+
41
+
| [QUnit 2.23.1](https://github.com/qunitjs/qunit/releases/tag/2.23.1) | Add support for CLI `--seed=true`, URL `?seed=true`, and [flat preconfig](./index.md#preconfiguration)`qunit_config_seed=true`.
42
+
| [QUnit 2.21.0](https://github.com/qunitjs/qunit/releases/tag/2.21.0) | Introduce [flat preconfig](./index.md#preconfiguration), including `qunit_config_seed=<value>`.
43
+
| [QUnit 2.3.0](https://github.com/qunitjs/qunit/releases/tag/2.3.0) | Introduce [QUnit CLI](../../cli.md), including `--seed <value>`.
| [QUnit 1.23.0](https://github.com/qunitjs/qunit/releases/tag/1.23.0) | Introduce `QUnit.config.seed`, with `?seed` as way to generate a new random seed.
0 commit comments