@@ -168,7 +168,7 @@ describe('animations', function() {
168
168
inject ( function ( $animate , $rootScope ) {
169
169
$animate . enter ( element , parent ) ;
170
170
$rootScope . $digest ( ) ;
171
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
171
+ expect ( capturedAnimation ) . toBe ( null ) ;
172
172
expect ( element [ 0 ] . parentNode ) . toEqual ( parent [ 0 ] ) ;
173
173
174
174
hidden = false ;
@@ -188,7 +188,7 @@ describe('animations', function() {
188
188
189
189
$animate . enter ( element , parent ) ;
190
190
$rootScope . $digest ( ) ;
191
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
191
+ expect ( capturedAnimation ) . toBe ( null ) ;
192
192
193
193
element . addClass ( 'only-allow-this-animation' ) ;
194
194
@@ -208,7 +208,7 @@ describe('animations', function() {
208
208
209
209
$animate . enter ( svgElement , parent ) ;
210
210
$rootScope . $digest ( ) ;
211
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
211
+ expect ( capturedAnimation ) . toBe ( null ) ;
212
212
213
213
svgElement . attr ( 'class' , 'element only-allow-this-animation-svg' ) ;
214
214
@@ -290,7 +290,7 @@ describe('animations', function() {
290
290
$animate . leave ( element ) ;
291
291
$rootScope . $digest ( ) ;
292
292
293
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
293
+ expect ( capturedAnimation ) . toBe ( null ) ;
294
294
expect ( element [ 0 ] . parentNode ) . toBeFalsy ( ) ;
295
295
} ) ;
296
296
} ) ;
@@ -314,9 +314,9 @@ describe('animations', function() {
314
314
315
315
$animate . enter ( element , parent ) ;
316
316
317
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
317
+ expect ( capturedAnimation ) . toBe ( null ) ;
318
318
$rootScope . $digest ( ) ;
319
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
319
+ expect ( capturedAnimation ) . toBe ( null ) ;
320
320
} ) ) ;
321
321
322
322
it ( 'should disable all animations on the given element' ,
@@ -328,15 +328,15 @@ describe('animations', function() {
328
328
expect ( $animate . enabled ( element ) ) . toBeFalsy ( ) ;
329
329
330
330
$animate . addClass ( element , 'red' ) ;
331
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
331
+ expect ( capturedAnimation ) . toBe ( null ) ;
332
332
$rootScope . $digest ( ) ;
333
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
333
+ expect ( capturedAnimation ) . toBe ( null ) ;
334
334
335
335
$animate . enabled ( element , true ) ;
336
336
expect ( $animate . enabled ( element ) ) . toBeTruthy ( ) ;
337
337
338
338
$animate . addClass ( element , 'blue' ) ;
339
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
339
+ expect ( capturedAnimation ) . toBe ( null ) ;
340
340
$rootScope . $digest ( ) ;
341
341
expect ( capturedAnimation ) . toBeTruthy ( ) ;
342
342
} ) ) ;
@@ -347,14 +347,14 @@ describe('animations', function() {
347
347
$animate . enabled ( parent , false ) ;
348
348
349
349
$animate . enter ( element , parent ) ;
350
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
350
+ expect ( capturedAnimation ) . toBe ( null ) ;
351
351
$rootScope . $digest ( ) ;
352
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
352
+ expect ( capturedAnimation ) . toBe ( null ) ;
353
353
354
354
$animate . enabled ( parent , true ) ;
355
355
356
356
$animate . enter ( element , parent ) ;
357
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
357
+ expect ( capturedAnimation ) . toBe ( null ) ;
358
358
$rootScope . $digest ( ) ;
359
359
expect ( capturedAnimation ) . toBeTruthy ( ) ;
360
360
} ) ) ;
@@ -370,11 +370,11 @@ describe('animations', function() {
370
370
371
371
$animate . addClass ( element , 'red' ) ;
372
372
$rootScope . $digest ( ) ;
373
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
373
+ expect ( capturedAnimation ) . toBe ( null ) ;
374
374
375
375
$animate . addClass ( child , 'red' ) ;
376
376
$rootScope . $digest ( ) ;
377
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
377
+ expect ( capturedAnimation ) . toBe ( null ) ;
378
378
379
379
$animate . enabled ( element , true ) ;
380
380
@@ -402,7 +402,7 @@ describe('animations', function() {
402
402
$rootScope . items = [ 1 , 2 , 3 , 4 , 5 ] ;
403
403
$rootScope . $digest ( ) ;
404
404
405
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
405
+ expect ( capturedAnimation ) . toBe ( null ) ;
406
406
} ) ) ;
407
407
408
408
it ( 'should not attempt to perform an animation on a text node element' ,
@@ -414,7 +414,7 @@ describe('animations', function() {
414
414
$animate . addClass ( textNode , 'some-class' ) ;
415
415
$rootScope . $digest ( ) ;
416
416
417
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
417
+ expect ( capturedAnimation ) . toBe ( null ) ;
418
418
} ) ) ;
419
419
420
420
it ( 'should not attempt to perform an animation on an empty jqLite collection' ,
@@ -426,7 +426,7 @@ describe('animations', function() {
426
426
$animate . addClass ( emptyNode , 'some-class' ) ;
427
427
$rootScope . $digest ( ) ;
428
428
429
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
429
+ expect ( capturedAnimation ) . toBe ( null ) ;
430
430
} )
431
431
) ;
432
432
@@ -439,7 +439,7 @@ describe('animations', function() {
439
439
440
440
$animate . leave ( textNode ) ;
441
441
$rootScope . $digest ( ) ;
442
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
442
+ expect ( capturedAnimation ) . toBe ( null ) ;
443
443
expect ( textNode [ 0 ] . parentNode ) . not . toBe ( parentNode ) ;
444
444
} ) ) ;
445
445
@@ -455,7 +455,7 @@ describe('animations', function() {
455
455
456
456
$animate . leave ( commentNode ) ;
457
457
$rootScope . $digest ( ) ;
458
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
458
+ expect ( capturedAnimation ) . toBe ( null ) ;
459
459
expect ( commentNode [ 0 ] . parentNode ) . not . toBe ( parentNode ) ;
460
460
} ) ) ;
461
461
@@ -687,13 +687,13 @@ describe('animations', function() {
687
687
688
688
$animate . removeClass ( element , 'something-to-remove' ) ;
689
689
$rootScope . $digest ( ) ;
690
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
690
+ expect ( capturedAnimation ) . toBe ( null ) ;
691
691
692
692
element . addClass ( 'something-to-add' ) ;
693
693
694
694
$animate . addClass ( element , 'something-to-add' ) ;
695
695
$rootScope . $digest ( ) ;
696
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
696
+ expect ( capturedAnimation ) . toBe ( null ) ;
697
697
} ) ) ;
698
698
} ) ;
699
699
@@ -709,7 +709,7 @@ describe('animations', function() {
709
709
parent . append ( element ) ;
710
710
$animate . animate ( element , null , toStyle ) ;
711
711
$rootScope . $digest ( ) ;
712
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
712
+ expect ( capturedAnimation ) . toBe ( null ) ;
713
713
} ) ;
714
714
} ) ;
715
715
@@ -720,7 +720,7 @@ describe('animations', function() {
720
720
parent . append ( element ) ;
721
721
$animate . animate ( element , fromStyle ) ;
722
722
$rootScope . $digest ( ) ;
723
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
723
+ expect ( capturedAnimation ) . toBe ( null ) ;
724
724
} ) ) ;
725
725
726
726
it ( 'should perform an animation if only from styles are provided as well as any valid classes' ,
@@ -732,7 +732,7 @@ describe('animations', function() {
732
732
var options = { removeClass : 'goop' } ;
733
733
$animate . animate ( element , fromStyle , null , null , options ) ;
734
734
$rootScope . $digest ( ) ;
735
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
735
+ expect ( capturedAnimation ) . toBe ( null ) ;
736
736
737
737
fromStyle = { color : 'blue' } ;
738
738
options = { addClass : 'goop' } ;
@@ -836,11 +836,11 @@ describe('animations', function() {
836
836
837
837
var elm1 = $compile ( '<div class="animated"></div>' ) ( $rootScope ) ;
838
838
839
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
839
+ expect ( capturedAnimation ) . toBe ( null ) ;
840
840
$animate . addClass ( elm1 , 'klass2' ) ;
841
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
841
+ expect ( capturedAnimation ) . toBe ( null ) ;
842
842
$rootScope . $digest ( ) ;
843
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
843
+ expect ( capturedAnimation ) . toBe ( null ) ;
844
844
} ) ) ;
845
845
846
846
it ( 'should skip animations if the element is attached to the $rootElement, but not apart of the body' ,
@@ -854,30 +854,30 @@ describe('animations', function() {
854
854
newParent . append ( $rootElement ) ;
855
855
$rootElement . append ( elm1 ) ;
856
856
857
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
857
+ expect ( capturedAnimation ) . toBe ( null ) ;
858
858
$animate . addClass ( elm1 , 'klass2' ) ;
859
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
859
+ expect ( capturedAnimation ) . toBe ( null ) ;
860
860
$rootScope . $digest ( ) ;
861
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
861
+ expect ( capturedAnimation ) . toBe ( null ) ;
862
862
} ) ) ;
863
863
864
864
it ( 'should skip the animation if the element is removed from the DOM before the post digest kicks in' ,
865
865
inject ( function ( $animate , $rootScope ) {
866
866
867
867
$animate . enter ( element , parent ) ;
868
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
868
+ expect ( capturedAnimation ) . toBe ( null ) ;
869
869
870
870
element . remove ( ) ;
871
871
$rootScope . $digest ( ) ;
872
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
872
+ expect ( capturedAnimation ) . toBe ( null ) ;
873
873
} ) ) ;
874
874
875
875
it ( 'should be blocked when there is an ongoing structural parent animation occurring' ,
876
876
inject ( function ( $rootScope , $rootElement , $animate ) {
877
877
878
878
parent . append ( element ) ;
879
879
880
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
880
+ expect ( capturedAnimation ) . toBe ( null ) ;
881
881
$animate . move ( parent , parent2 ) ;
882
882
$rootScope . $digest ( ) ;
883
883
@@ -887,7 +887,7 @@ describe('animations', function() {
887
887
888
888
$animate . addClass ( element , 'blue' ) ;
889
889
$rootScope . $digest ( ) ;
890
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
890
+ expect ( capturedAnimation ) . toBe ( null ) ;
891
891
} ) ) ;
892
892
893
893
it ( 'should disable all child animations for atleast one turn when a structural animation is issued' ,
@@ -937,7 +937,7 @@ describe('animations', function() {
937
937
938
938
parent . append ( element ) ;
939
939
940
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
940
+ expect ( capturedAnimation ) . toBe ( null ) ;
941
941
$animate . addClass ( parent , 'rogers' ) ;
942
942
$rootScope . $digest ( ) ;
943
943
@@ -960,7 +960,7 @@ describe('animations', function() {
960
960
$animate . addClass ( element , 'rumlow' ) ;
961
961
$animate . move ( parent , null , parent2 ) ;
962
962
963
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
963
+ expect ( capturedAnimation ) . toBe ( null ) ;
964
964
expect ( capturedAnimationHistory . length ) . toBe ( 0 ) ;
965
965
$rootScope . $digest ( ) ;
966
966
@@ -1213,12 +1213,12 @@ describe('animations', function() {
1213
1213
inject ( function ( $animate , $rootScope ) {
1214
1214
1215
1215
$animate . enter ( element , parent ) ;
1216
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1216
+ expect ( capturedAnimation ) . toBe ( null ) ;
1217
1217
1218
1218
$animate . addClass ( element , 'red' ) ;
1219
1219
expect ( element ) . not . toHaveClass ( 'red' ) ;
1220
1220
1221
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1221
+ expect ( capturedAnimation ) . toBe ( null ) ;
1222
1222
$rootScope . $digest ( ) ;
1223
1223
1224
1224
expect ( capturedAnimation [ 1 ] ) . toBe ( 'enter' ) ;
@@ -1247,7 +1247,7 @@ describe('animations', function() {
1247
1247
$animate . removeClass ( element , 'red' ) ;
1248
1248
$rootScope . $digest ( ) ;
1249
1249
1250
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1250
+ expect ( capturedAnimation ) . toBe ( null ) ;
1251
1251
1252
1252
$animate . addClass ( element , 'blue' ) ;
1253
1253
$rootScope . $digest ( ) ;
@@ -1364,7 +1364,7 @@ describe('animations', function() {
1364
1364
$animate . removeClass ( element , 'four' ) ;
1365
1365
1366
1366
$rootScope . $digest ( ) ;
1367
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1367
+ expect ( capturedAnimation ) . toBe ( null ) ;
1368
1368
} ) ) ;
1369
1369
1370
1370
it ( 'but not skip the animation if it is a structural animation and if there are no classes to be animated' ,
@@ -1652,7 +1652,7 @@ describe('animations', function() {
1652
1652
1653
1653
$animate . addClass ( animateElement , 'red' ) ;
1654
1654
$rootScope . $digest ( ) ;
1655
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1655
+ expect ( capturedAnimation ) . toBe ( null ) ;
1656
1656
1657
1657
// Pin the element to the app root to enable animations
1658
1658
$animate . pin ( pinElement , $rootElement ) ;
@@ -1696,13 +1696,13 @@ describe('animations', function() {
1696
1696
1697
1697
$animate . addClass ( animateElement , 'red' ) ;
1698
1698
$rootScope . $digest ( ) ;
1699
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1699
+ expect ( capturedAnimation ) . toBe ( null ) ;
1700
1700
1701
1701
$animate . pin ( pinElement , pinTargetElement ) ;
1702
1702
1703
1703
$animate . addClass ( animateElement , 'blue' ) ;
1704
1704
$rootScope . $digest ( ) ;
1705
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1705
+ expect ( capturedAnimation ) . toBe ( null ) ;
1706
1706
1707
1707
dealoc ( pinElement ) ;
1708
1708
} ) ;
@@ -1740,7 +1740,7 @@ describe('animations', function() {
1740
1740
1741
1741
$animate . addClass ( animateElement , 'blue' ) ;
1742
1742
$rootScope . $digest ( ) ;
1743
- expect ( capturedAnimation ) . toBeFalsy ( ) ;
1743
+ expect ( capturedAnimation ) . toBe ( null ) ;
1744
1744
1745
1745
$animate . enabled ( pinHostElement , true ) ;
1746
1746
0 commit comments