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

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 8b39ef8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ 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
Original file line number Diff line number Diff line change
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 8b39ef8

Please sign in to comment.