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

Commit 852fb5d

Browse files
committed
chore(jasmine): remove random test options
1 parent 5d8da04 commit 852fb5d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lib/frameworks/jasmine.js

+4-10
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ 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);
78+
jasmineNodeOpts.random = false;
7779

7880
// Add hooks for afterEach
7981
require('./setupAfterEach').setup(runner, specs);
8082

8183
// Filter specs to run based on jasmineNodeOpts.grep and jasmineNodeOpts.invert.
82-
jasmine.getEnv().specFilter = function(spec) {
84+
jasmine.getEnv().configuration().specFilter = function(spec) {
8385
var grepMatch = !jasmineNodeOpts ||
8486
!jasmineNodeOpts.grep ||
8587
spec.getFullName().match(new RegExp(jasmineNodeOpts.grep)) != null;
@@ -90,15 +92,7 @@ exports.run = async function(runner, specs) {
9092
return true;
9193
};
9294

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-
}
95+
10296

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

0 commit comments

Comments
 (0)