File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const rules = require('../../').rules;
66const ruleTester = new RuleTester ( ) ;
77
88ruleTester . run ( 'prefer_to_be_null' , rules [ 'prefer-to-be-null' ] , {
9- valid : [ 'expect(null).toBeNull();' ] ,
9+ valid : [ 'expect(null).toBeNull();' , 'expect(null).toEqual();' ] ,
1010
1111 invalid : [
1212 {
Original file line number Diff line number Diff line change @@ -26,22 +26,26 @@ const expectToBeCase = (node, arg) =>
2626 ! ( expectNotCase ( node ) || expectResolveCase ( node ) || expectRejectCase ( node ) ) &&
2727 expectCase ( node ) &&
2828 methodName ( node ) === 'toBe' &&
29+ argument ( node ) &&
2930 argument ( node ) . value === arg ;
3031
3132const expectNotToBeCase = ( node , arg ) =>
3233 expectNotCase ( node ) &&
3334 methodName2 ( node ) === 'toBe' &&
35+ argument2 ( node ) &&
3436 argument2 ( node ) . value === arg ;
3537
3638const expectToEqualCase = ( node , arg ) =>
3739 ! ( expectNotCase ( node ) || expectResolveCase ( node ) || expectRejectCase ( node ) ) &&
3840 expectCase ( node ) &&
3941 methodName ( node ) === 'toEqual' &&
42+ argument ( node ) &&
4043 argument ( node ) . value === arg ;
4144
4245const expectNotToEqualCase = ( node , arg ) =>
4346 expectNotCase ( node ) &&
4447 methodName2 ( node ) === 'toEqual' &&
48+ argument2 ( node ) &&
4549 argument2 ( node ) . value === arg ;
4650
4751const expectToBeUndefinedCase = node =>
You can’t perform that action at this time.
0 commit comments