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

Commit 65b654e

Browse files
committed
feat(jasmine): add support for stopOnSpecFailure option
1 parent 23e4b30 commit 65b654e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,11 @@ export interface Config {
648648
* Set the randomization seed if randomization is turned on
649649
*/
650650
seed?: string,
651+
/**
652+
* Enables failFast option in jasmine, which stops the execution of the suite whether the first
653+
* spec is failed.
654+
*/
655+
stopOnSpecFailure?: boolean,
651656
};
652657

653658
/**

lib/frameworks/jasmine.js

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ exports.run = async function(runner, specs) {
100100
}
101101
}
102102

103+
if (jasmineNodeOpts.stopOnSpecFailure) {
104+
jasmine.getEnv().stopOnSpecFailure(jasmineNodeOpts.stopOnSpecFailure);
105+
}
106+
103107
await runner.runTestPreparer();
104108
return new Promise((resolve, reject) => {
105109
if (jasmineNodeOpts && jasmineNodeOpts.defaultTimeoutInterval) {

0 commit comments

Comments
 (0)