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

Commit 8b39ef8

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

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ 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 spec is failed.
653+
*/
654+
stopOnSpecFailure?: boolean,
651655
};
652656

653657
/**

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)