Closed magynhard closed 2 years ago
If you're trying to turn randomization off permanently, you can add "env": { "random": false }
to your config file. (The README and the getting started page said to use "random": true
until about 5 minutes ago. That was a mistake.) If you're only trying to turn it off for a single interactive run, the supported way to do that is indeed to manipulate the URL either manually or using the options UI on the spec runner HTML page.
Note that there's only a little bit of overlap between the options supported by the serve
and runSpecs
subcommands, and neither of them supports --verbose
:
% npx jasmine-browser-runner help
Usage: jasmine-browser <command> [options]
Commands:
help, -h show help
version, -v show versions for this and jasmine-core
init initialize a new Jasmine project
serve start a server with your Jasmine specs
runSpecs start a server and run your Jasmine specs in a browser
Subcommand options:
init
--esm configure for use with ES modules (<script type="module">)
serve
--config=<value> path to the config file
--port=<value> port to run the server on
runSpecs
--config=<value> path to the config file
--port=<value> port to run the server on
--[no-]color turn on or off color output
--filter=<value> filter specs to run only those that match the given
string
--fail-fast stop Jasmine execution on the first failure
--[no-]random turn on or off randomization
--seed=<value> specify a seed for randomization
--reporter=<value> path to reporter to use instead of the default Jasmine
reporter
--browser=<value> which local browser to launch
Thank you for your reply.
Your commit https://github.com/jasmine/jasmine-browser-runner/commit/763ffc8a9b11e9aa621eb9bfe9709a1527f8bc89 helped me to solve my problem by using
# package.json
{
...
"env": {
"random": false
}
}
which affects runSpecs
and serve
as well. So random run is even is disabled without any URL parameter on serve
and i can just click the link and run the tests without an initial unwanted random run.
Not having the --[no]-random
parameter flag for serve
could lead many developers to the false assumption that the random option is generally not available for serve
at all. So you might consider adding it there.
But for me ... I'm happy now with the correct configuration!
Thank you!
When running
and using the following configuration at
spec/support/jasmine-browser.json
:I get the following output:
The option
random: false
has no effect.I expect, that the URI in line 2 should include the option as parameter:
And I expect the same behaviour for the other options as well, if set.
Otherwise i always have to add that parameter manually, before opening the URI inside the browser.