Skip to content

Commit

Permalink
chore(jasmine): remove random test options
Browse files Browse the repository at this point in the history
- breaking change: random option was removed to run Jasmine tests
  • Loading branch information
cnishina committed Apr 2, 2019
1 parent 20f6a02 commit d296b2b
Showing 1 changed file with 3 additions and 10 deletions.
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

0 comments on commit d296b2b

Please sign in to comment.