@@ -134,6 +134,11 @@ ruleTester.run('prefer-to-be: undefined', rule, {
134
134
output : 'expect("a string").toBeDefined();' ,
135
135
errors : [ { messageId : 'useToBeDefined' , column : 24 , line : 1 } ] ,
136
136
} ,
137
+ {
138
+ code : 'expect("a string").rejects.not.toBe(undefined);' ,
139
+ output : 'expect("a string").rejects.toBeDefined();' ,
140
+ errors : [ { messageId : 'useToBeDefined' , column : 32 , line : 1 } ] ,
141
+ } ,
137
142
{
138
143
code : 'expect("a string").not.toEqual(undefined);' ,
139
144
output : 'expect("a string").toBeDefined();' ,
@@ -181,6 +186,11 @@ ruleTester.run('prefer-to-be: NaN', rule, {
181
186
output : 'expect("a string").not.toBeNaN();' ,
182
187
errors : [ { messageId : 'useToBeNaN' , column : 24 , line : 1 } ] ,
183
188
} ,
189
+ {
190
+ code : 'expect("a string").rejects.not.toBe(NaN);' ,
191
+ output : 'expect("a string").rejects.not.toBeNaN();' ,
192
+ errors : [ { messageId : 'useToBeNaN' , column : 32 , line : 1 } ] ,
193
+ } ,
184
194
{
185
195
code : 'expect("a string").not.toEqual(NaN);' ,
186
196
output : 'expect("a string").not.toBeNaN();' ,
@@ -218,6 +228,11 @@ ruleTester.run('prefer-to-be: undefined vs defined', rule, {
218
228
output : 'expect(undefined).resolves.toBeUndefined();' ,
219
229
errors : [ { messageId : 'useToBeUndefined' , column : 32 , line : 1 } ] ,
220
230
} ,
231
+ {
232
+ code : 'expect(undefined).resolves.toBe(undefined);' ,
233
+ output : 'expect(undefined).resolves.toBeUndefined();' ,
234
+ errors : [ { messageId : 'useToBeUndefined' , column : 28 , line : 1 } ] ,
235
+ } ,
221
236
{
222
237
code : 'expect("a string").not.toBeUndefined();' ,
223
238
output : 'expect("a string").toBeDefined();' ,
0 commit comments