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

chore(jasmine): remove random test options #5200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions lib/frameworks/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ exports.run = async function(runner, specs) {
// work well with e2e tests where the browser state is determined by the
// order of the tests. Setting to false will prevent random execution.
// See https://jasmine.github.io/api/3.3/Env.html
jasmine.getEnv().configuration().random = false;
jasmine.getEnv().randomizeTests(false);

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

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

// Run specs in semi-random order
if (jasmineNodeOpts.random) {
jasmine.getEnv().randomizeTests(true);

// Sets the randomization seed if randomization is turned on
if (jasmineNodeOpts.seed) {
jasmine.getEnv().seed(jasmineNodeOpts.seed);
}
}


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