Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit d296b2b

Browse files
committedApr 2, 2019
chore(jasmine): remove random test options
- breaking change: random option was removed to run Jasmine tests
1 parent 20f6a02 commit d296b2b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed
 

‎lib/frameworks/jasmine.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,14 @@ exports.run = async function(runner, specs) {
7373
// work well with e2e tests where the browser state is determined by the
7474
// order of the tests. Setting to false will prevent random execution.
7575
// See https://jasmine.github.io/api/3.3/Env.html
76+
jasmine.getEnv().configuration().random = false;
7677
jasmine.getEnv().randomizeTests(false);
7778

7879
// Add hooks for afterEach
7980
require('./setupAfterEach').setup(runner, specs);
8081

8182
// Filter specs to run based on jasmineNodeOpts.grep and jasmineNodeOpts.invert.
82-
jasmine.getEnv().specFilter = function(spec) {
83+
jasmine.getEnv().configuration().specFilter = function(spec) {
8384
var grepMatch = !jasmineNodeOpts ||
8485
!jasmineNodeOpts.grep ||
8586
spec.getFullName().match(new RegExp(jasmineNodeOpts.grep)) != null;
@@ -90,15 +91,7 @@ exports.run = async function(runner, specs) {
9091
return true;
9192
};
9293

93-
// Run specs in semi-random order
94-
if (jasmineNodeOpts.random) {
95-
jasmine.getEnv().randomizeTests(true);
96-
97-
// Sets the randomization seed if randomization is turned on
98-
if (jasmineNodeOpts.seed) {
99-
jasmine.getEnv().seed(jasmineNodeOpts.seed);
100-
}
101-
}
94+
10295

10396
await runner.runTestPreparer();
10497
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)
Failed to load comments.