File tree 1 file changed +14
-0
lines changed
packages/n4s/src/rules/__tests__
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ describe('isValueOf tests', () => {
47
47
expect ( ( ) => enforce ( null ) . isValueOf ( testObject ) ) . toThrow ( ) ;
48
48
} ) ;
49
49
} ) ;
50
+
51
+ describe ( 'When object to check is nullish' , ( ) => {
52
+ it ( 'Should return false' , ( ) => {
53
+ expect ( isValueOf ( 'Bravo' , null ) ) . toBe ( false ) ;
54
+ expect ( isValueOf ( 'Bravo' , undefined ) ) . toBe ( false ) ;
55
+ } ) ;
56
+ } ) ;
50
57
} ) ;
51
58
52
59
describe ( 'isNotValueOf tests' , ( ) => {
@@ -69,4 +76,11 @@ describe('isNotValueOf tests', () => {
69
76
expect ( ( ) => enforce ( 42 ) . isNotValueOf ( testObject ) ) . toThrow ( ) ;
70
77
} ) ;
71
78
} ) ;
79
+
80
+ describe ( 'When object to check is nullish' , ( ) => {
81
+ it ( 'Should return true' , ( ) => {
82
+ expect ( isNotValueOf ( 'Bravo' , null ) ) . toBe ( true ) ;
83
+ expect ( isNotValueOf ( 'Bravo' , undefined ) ) . toBe ( true ) ;
84
+ } ) ;
85
+ } ) ;
72
86
} ) ;
You can’t perform that action at this time.
0 commit comments