@@ -547,6 +547,7 @@ describe('angular', function() {
547
547
expect ( equals ( new Date ( undefined ) , new Date ( 0 ) ) ) . toBe ( false ) ;
548
548
expect ( equals ( new Date ( undefined ) , new Date ( null ) ) ) . toBe ( false ) ;
549
549
expect ( equals ( new Date ( undefined ) , new Date ( 'wrong' ) ) ) . toBe ( true ) ;
550
+ expect ( equals ( new Date ( ) , / a b c / ) ) . toBe ( false ) ;
550
551
} ) ;
551
552
552
553
it ( 'should correctly test for keys that are present on Object.prototype' , function ( ) {
@@ -564,12 +565,22 @@ describe('angular', function() {
564
565
expect ( equals ( / a b c / , / d e f / ) ) . toBe ( false ) ;
565
566
expect ( equals ( / ^ a b c / , / a b c / ) ) . toBe ( false ) ;
566
567
expect ( equals ( / ^ a b c / , '/^abc/' ) ) . toBe ( false ) ;
568
+ expect ( equals ( / a b c / , new Date ( ) ) ) . toBe ( false ) ;
567
569
} ) ;
568
570
569
571
it ( 'should return false when comparing an object and an array' , function ( ) {
570
572
expect ( equals ( { } , [ ] ) ) . toBe ( false ) ;
571
573
expect ( equals ( [ ] , { } ) ) . toBe ( false ) ;
572
574
} ) ;
575
+
576
+ it ( 'should return false when comparing an object and a RegExp' , function ( ) {
577
+ expect ( equals ( { } , / a b c / ) ) . toBe ( false ) ;
578
+ expect ( equals ( { } , new RegExp ( 'abc' , 'i' ) ) ) . toBe ( false ) ;
579
+ } ) ;
580
+
581
+ it ( 'should return false when comparing an object and a Date' , function ( ) {
582
+ expect ( equals ( { } , new Date ( ) ) ) . toBe ( false ) ;
583
+ } ) ;
573
584
} ) ;
574
585
575
586
0 commit comments