File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ describe('toBeFalsy', function() {
15
15
result = matcher . compare ( null ) ;
16
16
expect ( result . pass ) . toBe ( true ) ;
17
17
18
+ result = matcher . compare ( undefined ) ;
19
+ expect ( result . pass ) . toBe ( true ) ;
20
+
18
21
result = matcher . compare ( void 0 ) ;
19
22
expect ( result . pass ) . toBe ( true ) ;
20
23
} ) ;
@@ -34,5 +37,11 @@ describe('toBeFalsy', function() {
34
37
35
38
result = matcher . compare ( { } ) ;
36
39
expect ( result . pass ) . toBe ( false ) ;
40
+
41
+ result = matcher . compare ( [ ] ) ;
42
+ expect ( result . pass ) . toBe ( false ) ;
43
+
44
+ result = matcher . compare ( function ( ) { } ) ;
45
+ expect ( result . pass ) . toBe ( false ) ;
37
46
} ) ;
38
47
} ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ describe('toBeTruthy', function() {
14
14
15
15
result = matcher . compare ( { } ) ;
16
16
expect ( result . pass ) . toBe ( true ) ;
17
+
18
+ result = matcher . compare ( [ ] ) ;
19
+ expect ( result . pass ) . toBe ( true ) ;
20
+
21
+ result = matcher . compare ( function ( ) { } ) ;
22
+ expect ( result . pass ) . toBe ( true ) ;
17
23
} ) ;
18
24
19
25
it ( "fails for 'falsy' values" , function ( ) {
@@ -32,6 +38,9 @@ describe('toBeTruthy', function() {
32
38
result = matcher . compare ( null ) ;
33
39
expect ( result . pass ) . toBe ( false ) ;
34
40
41
+ result = matcher . compare ( undefined ) ;
42
+ expect ( result . pass ) . toBe ( false ) ;
43
+
35
44
result = matcher . compare ( void 0 ) ;
36
45
expect ( result . pass ) . toBe ( false ) ;
37
46
} ) ;
You can’t perform that action at this time.
0 commit comments