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

Commit 84cdc50

Browse files
authored
chore(jasmine): prevent random execution order in jasmine 3 (#5126)
1 parent 205c4d8 commit 84cdc50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/frameworks/jasmine.js

+6
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ exports.run = async function(runner, specs) {
6969
const reporter = new RunnerReporter(runner);
7070
jasmine.getEnv().addReporter(reporter);
7171

72+
// Jasmine 3 allows for tests to be in random order by default. This does not
73+
// work well with e2e tests where the browser state is determined by the
74+
// order of the tests. Setting to false will prevent random execution.
75+
// See https://jasmine.github.io/api/3.3/Env.html
76+
jasmine.getEnv().randomizeTests(false);
77+
7278
// Add hooks for afterEach
7379
require('./setupAfterEach').setup(runner, specs);
7480

0 commit comments

Comments
 (0)