Skip to content

Commit

Permalink
feat(jasmine): add support for stopOnSpecFailure option
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaRedM committed Mar 2, 2020
1 parent 23e4b30 commit 65b654e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/config.ts
Expand Up @@ -648,6 +648,11 @@ export interface Config {
* Set the randomization seed if randomization is turned on
*/
seed?: string,
/**
* Enables failFast option in jasmine, which stops the execution of the suite whether the first
* spec is failed.
*/
stopOnSpecFailure?: boolean,
};

/**
Expand Down
4 changes: 4 additions & 0 deletions lib/frameworks/jasmine.js
Expand Up @@ -100,6 +100,10 @@ exports.run = async function(runner, specs) {
}
}

if (jasmineNodeOpts.stopOnSpecFailure) {
jasmine.getEnv().stopOnSpecFailure(jasmineNodeOpts.stopOnSpecFailure);
}

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

0 comments on commit 65b654e

Please sign in to comment.