Skip to content

Commit dcaac62

Browse files
committed
Updated deprecaton messages for Env#throwOnExpectationFailure() and Env#stopOnSpecFailure()
1 parent b696bec commit dcaac62

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

lib/jasmine-core/jasmine.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,18 +1553,22 @@ getJasmineRequireObj().Env = function(j$) {
15531553
* @since 2.3.0
15541554
* @function
15551555
* @param {Boolean} value Whether to throw when a expectation fails
1556-
* @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}
1556+
* @deprecated Use the `stopSpecOnExpectationFailure` option with {@link Env#configure}
15571557
*/
15581558
this.throwOnExpectationFailure = function(value) {
15591559
this.deprecated(
1560-
'Setting throwOnExpectationFailure directly on Env is deprecated and will be removed in a future version of Jasmine, please use the oneFailurePerSpec option in `configure`'
1560+
'Setting throwOnExpectationFailure directly on Env is deprecated and ' +
1561+
'will be removed in a future version of Jasmine. Please use the ' +
1562+
'stopSpecOnExpectationFailure option in `configure`.'
15611563
);
15621564
this.configure({ oneFailurePerSpec: !!value });
15631565
};
15641566

15651567
this.throwingExpectationFailures = function() {
15661568
this.deprecated(
1567-
'Getting throwingExpectationFailures directly from Env is deprecated and will be removed in a future version of Jasmine, please check the oneFailurePerSpec option from `configuration`'
1569+
'Getting throwingExpectationFailures directly from Env is deprecated ' +
1570+
'and will be removed in a future version of Jasmine. Please check ' +
1571+
'the stopSpecOnExpectationFailure option from `configuration`.'
15681572
);
15691573
return config.oneFailurePerSpec;
15701574
};
@@ -1575,18 +1579,22 @@ getJasmineRequireObj().Env = function(j$) {
15751579
* @since 2.7.0
15761580
* @function
15771581
* @param {Boolean} value Whether to stop suite execution when a spec fails
1578-
* @deprecated Use the `failFast` option with {@link Env#configure}
1582+
* @deprecated Use the `stopOnSpecFailure` option with {@link Env#configure}
15791583
*/
15801584
this.stopOnSpecFailure = function(value) {
15811585
this.deprecated(
1582-
'Setting stopOnSpecFailure directly is deprecated and will be removed in a future version of Jasmine, please use the failFast option in `configure`'
1586+
'Setting stopOnSpecFailure directly is deprecated and will be ' +
1587+
'removed in a future version of Jasmine. Please use the ' +
1588+
'stopOnSpecFailure option in `configure`.'
15831589
);
15841590
this.configure({ stopOnSpecFailure: !!value });
15851591
};
15861592

15871593
this.stoppingOnSpecFailure = function() {
15881594
this.deprecated(
1589-
'Getting stoppingOnSpecFailure directly from Env is deprecated and will be removed in a future version of Jasmine, please check the failFast option from `configuration`'
1595+
'Getting stoppingOnSpecFailure directly from Env is deprecated and ' +
1596+
'will be removed in a future version of Jasmine. Please check the ' +
1597+
'stopOnSpecFailure option from `configuration`.'
15901598
);
15911599
return config.failFast;
15921600
};

src/core/Env.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,18 +543,22 @@ getJasmineRequireObj().Env = function(j$) {
543543
* @since 2.3.0
544544
* @function
545545
* @param {Boolean} value Whether to throw when a expectation fails
546-
* @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}
546+
* @deprecated Use the `stopSpecOnExpectationFailure` option with {@link Env#configure}
547547
*/
548548
this.throwOnExpectationFailure = function(value) {
549549
this.deprecated(
550-
'Setting throwOnExpectationFailure directly on Env is deprecated and will be removed in a future version of Jasmine, please use the oneFailurePerSpec option in `configure`'
550+
'Setting throwOnExpectationFailure directly on Env is deprecated and ' +
551+
'will be removed in a future version of Jasmine. Please use the ' +
552+
'stopSpecOnExpectationFailure option in `configure`.'
551553
);
552554
this.configure({ oneFailurePerSpec: !!value });
553555
};
554556

555557
this.throwingExpectationFailures = function() {
556558
this.deprecated(
557-
'Getting throwingExpectationFailures directly from Env is deprecated and will be removed in a future version of Jasmine, please check the oneFailurePerSpec option from `configuration`'
559+
'Getting throwingExpectationFailures directly from Env is deprecated ' +
560+
'and will be removed in a future version of Jasmine. Please check ' +
561+
'the stopSpecOnExpectationFailure option from `configuration`.'
558562
);
559563
return config.oneFailurePerSpec;
560564
};
@@ -565,18 +569,22 @@ getJasmineRequireObj().Env = function(j$) {
565569
* @since 2.7.0
566570
* @function
567571
* @param {Boolean} value Whether to stop suite execution when a spec fails
568-
* @deprecated Use the `failFast` option with {@link Env#configure}
572+
* @deprecated Use the `stopOnSpecFailure` option with {@link Env#configure}
569573
*/
570574
this.stopOnSpecFailure = function(value) {
571575
this.deprecated(
572-
'Setting stopOnSpecFailure directly is deprecated and will be removed in a future version of Jasmine, please use the failFast option in `configure`'
576+
'Setting stopOnSpecFailure directly is deprecated and will be ' +
577+
'removed in a future version of Jasmine. Please use the ' +
578+
'stopOnSpecFailure option in `configure`.'
573579
);
574580
this.configure({ stopOnSpecFailure: !!value });
575581
};
576582

577583
this.stoppingOnSpecFailure = function() {
578584
this.deprecated(
579-
'Getting stoppingOnSpecFailure directly from Env is deprecated and will be removed in a future version of Jasmine, please check the failFast option from `configuration`'
585+
'Getting stoppingOnSpecFailure directly from Env is deprecated and ' +
586+
'will be removed in a future version of Jasmine. Please check the ' +
587+
'stopOnSpecFailure option from `configuration`.'
580588
);
581589
return config.failFast;
582590
};

0 commit comments

Comments
 (0)