Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.
Jump to
Jump to file
Failed to load files.
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