File tree 4 files changed +13
-16
lines changed
4 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,4 @@ module.exports = function(grunt) {
33
33
34
34
runCommands ( commands , done ) ;
35
35
} ) ;
36
-
37
- grunt . loadTasks ( 'tasks' ) ;
38
36
} ;
Original file line number Diff line number Diff line change @@ -462,6 +462,11 @@ function addFiles(kind) {
462
462
* @param {function } onCompleteCallback
463
463
*/
464
464
Jasmine . prototype . onComplete = function ( onCompleteCallback ) {
465
+ this . env . deprecated (
466
+ 'Jasmine#onComplete is deprecated. Instead of calling onComplete, set ' +
467
+ "the Jasmine instance's exitOnCompletion property to false and use the " +
468
+ 'promise returned from the execute method.'
469
+ ) ;
465
470
this . completionReporter . onComplete ( onCompleteCallback ) ;
466
471
} ;
467
472
Original file line number Diff line number Diff line change @@ -456,9 +456,13 @@ describe('Jasmine', function() {
456
456
it ( 'stores an onComplete function' , function ( ) {
457
457
var fakeOnCompleteCallback = function ( ) { } ;
458
458
spyOn ( this . testJasmine . completionReporter , 'onComplete' ) ;
459
+ this . testJasmine . env . deprecated = jasmine . createSpy ( 'env.deprecated' ) ;
459
460
460
461
this . testJasmine . onComplete ( fakeOnCompleteCallback ) ;
461
462
expect ( this . testJasmine . completionReporter . onComplete ) . toHaveBeenCalledWith ( fakeOnCompleteCallback ) ;
463
+ expect ( this . testJasmine . env . deprecated ) . toHaveBeenCalledWith (
464
+ "Jasmine#onComplete is deprecated. Instead of calling onComplete, set the Jasmine instance's exitOnCompletion property to false and use the promise returned from the execute method."
465
+ ) ;
462
466
} ) ;
463
467
} ) ;
464
468
@@ -629,6 +633,10 @@ describe('Jasmine', function() {
629
633
} ) ;
630
634
631
635
describe ( 'When #onComplete has been called' , function ( ) {
636
+ beforeEach ( function ( ) {
637
+ this . testJasmine . env . deprecated = function ( ) { } ;
638
+ } ) ;
639
+
632
640
it ( 'calls the supplied completion handler with true when the whole suite is green' , async function ( ) {
633
641
const completionHandler = jasmine . createSpy ( 'completionHandler' ) ;
634
642
this . testJasmine . onComplete ( completionHandler ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments