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
Usage: qunit [options] [files]
[…]
Options:
--seed [value] specify a seed to re-order your tests;
if specified without a value, a seed will be generated
[…]
When using qunit --seed it will default to running test/**.js and will print the randomly selected seed for future re-use. This works as expected:
$ qunit --seed
Running tests with seed: 3vjdr2nhlga
TAP version 13
ok 1 Single > has a test
1..1
# pass 1
# skip 0
# todo 0
# fail 0
The problem is, when using a files argument, the command becomes ambiguous and it naturally becomes the value for the seed instead:
$ qunit --seed test/single.js
Running tests with seed: test/single.js
[…]
This can be worked around currently by using -- to mark the end of the options and the start of the arguments:
$ qunit --seed -- test/single.js
Running tests with seed: 3vjdr2nhlga
TAP version 13
ok 1 Single > has a test
1..1
# pass 1
# skip 0
# todo 0
# fail 0
The text was updated successfully, but these errors were encountered:
In QUnit 3.0, reserve "new" and "true" as special seed values that result in a new random seed being used each time. This means --seed=new and --seed=true will no longer be treated as actual seeds but instead as instruction to generate a new seed. I think this will be more intuitive than introducing a separate option like --newseed, and keeps the diferent interfaces (preconfig, config, URL param, CLI option) more in line with each other.
In the HTML Reporter and TAP Reporter, present these to users to help reproduce a specific failure.
Alternatives I considered:
Introduce --newseed CLI option (along with ?newseed parameter, and QUnit.config.newseed = true). This will instruct QUnit to generate a new seed, and assign it to QUnit.config.seed. This can be backported to QUnit 2.x to ease the transition and allow for forward-compatible adoption.
In QUnit 3.0, change --seed CLI option to require a value, thus qunit --seed and qunit --seed -- test/ would fail due to a missing option value.
When using
qunit --seed
it will default to runningtest/**.js
and will print the randomly selected seed for future re-use. This works as expected:The problem is, when using a files argument, the command becomes ambiguous and it naturally becomes the value for the seed instead:
This can be worked around currently by using
--
to mark the end of the options and the start of the arguments:The text was updated successfully, but these errors were encountered: