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

feat(jasmine): add support for stopOnSpecFailure option #5403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
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
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