Skip to content

Commit 3c4ef58

Browse files
committed
Pass stopOnSpecFailure and stopSpecOnExpectationFailure options to core, not the deprecated failFast and oneFailurePerSpec options
1 parent e5b3989 commit 3c4ef58

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/jasmine.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Jasmine.prototype.loadConfig = function(config) {
271271
* @default false
272272
*/
273273
if (config.stopSpecOnExpectationFailure !== undefined) {
274-
envConfig.oneFailurePerSpec = config.stopSpecOnExpectationFailure;
274+
envConfig.stopSpecOnExpectationFailure = config.stopSpecOnExpectationFailure;
275275
}
276276

277277
/**
@@ -281,7 +281,7 @@ Jasmine.prototype.loadConfig = function(config) {
281281
* @default false
282282
*/
283283
if (config.stopOnSpecFailure !== undefined) {
284-
envConfig.failFast = config.stopOnSpecFailure;
284+
envConfig.stopOnSpecFailure = config.stopOnSpecFailure;
285285
}
286286

287287
/**
@@ -463,7 +463,7 @@ Jasmine.prototype.onComplete = function(onCompleteCallback) {
463463
* failure
464464
*/
465465
Jasmine.prototype.stopSpecOnExpectationFailure = function(value) {
466-
this.env.configure({oneFailurePerSpec: value});
466+
this.env.configure({stopSpecOnExpectationFailure: value});
467467
};
468468

469469
/**
@@ -474,7 +474,7 @@ Jasmine.prototype.stopSpecOnExpectationFailure = function(value) {
474474
* first spec failure
475475
*/
476476
Jasmine.prototype.stopOnSpecFailure = function(value) {
477-
this.env.configure({failFast: value});
477+
this.env.configure({stopOnSpecFailure: value});
478478
};
479479

480480
Jasmine.prototype.exitCodeCompletion = function(passed) {

spec/jasmine_spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ describe('Jasmine', function() {
236236
this.configObject.stopSpecOnExpectationFailure = true;
237237
this.fixtureJasmine.loadConfig(this.configObject);
238238

239-
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({oneFailurePerSpec: true});
239+
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({stopSpecOnExpectationFailure: true});
240240
});
241241

242242
it('does not configure jasmine-core for stopping spec on expectation failure by default', function() {
@@ -249,7 +249,7 @@ describe('Jasmine', function() {
249249
this.configObject.stopOnSpecFailure = true;
250250
this.fixtureJasmine.loadConfig(this.configObject);
251251

252-
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({failFast: true});
252+
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({stopOnSpecFailure: true});
253253
});
254254

255255
it('does not configure jasmine-core for stopping execution by default', function() {
@@ -387,16 +387,16 @@ describe('Jasmine', function() {
387387
});
388388

389389
describe('#stopSpecOnExpectationFailure', function() {
390-
it('sets the throwOnExpectationFailure value on the jasmine-core env', function() {
390+
it('sets the stopSpecOnExpectationFailure value on the jasmine-core env', function() {
391391
this.testJasmine.stopSpecOnExpectationFailure('foobar');
392-
expect(this.testJasmine.env.configure).toHaveBeenCalledWith({oneFailurePerSpec: 'foobar'});
392+
expect(this.testJasmine.env.configure).toHaveBeenCalledWith({stopSpecOnExpectationFailure: 'foobar'});
393393
});
394394
});
395395

396396
describe('#stopOnSpecFailure', function() {
397397
it('sets the stopOnSpecFailure value on the jasmine-core env', function() {
398398
this.testJasmine.stopOnSpecFailure('blah');
399-
expect(this.testJasmine.env.configure).toHaveBeenCalledWith({failFast: 'blah'});
399+
expect(this.testJasmine.env.configure).toHaveBeenCalledWith({stopOnSpecFailure: 'blah'});
400400
});
401401
});
402402

0 commit comments

Comments
 (0)