@@ -374,20 +374,6 @@ ruleTester.run('prefer-expect-assertions (loops)', rule, {
374
374
` ,
375
375
options : [ { onlyFunctionsWithExpectInLoop : true } ] ,
376
376
} ,
377
- {
378
- code : dedent `
379
- it('returns numbers that are greater than two', function () {
380
- const expectNumbersToBeGreaterThan = (numbers, value) => {
381
- for (let number of numbers) {
382
- expect(number).toBeGreaterThan(value);
383
- }
384
- };
385
-
386
- expectNumbersToBeGreaterThan(getNumbers(), 2);
387
- });
388
- ` ,
389
- options : [ { onlyFunctionsWithExpectInLoop : true } ] ,
390
- } ,
391
377
{
392
378
code : dedent `
393
379
it("returns numbers that are greater than five", function () {
@@ -431,6 +417,27 @@ ruleTester.run('prefer-expect-assertions (loops)', rule, {
431
417
} ,
432
418
] ,
433
419
} ,
420
+ {
421
+ code : dedent `
422
+ it('returns numbers that are greater than two', function () {
423
+ const expectNumbersToBeGreaterThan = (numbers, value) => {
424
+ for (let number of numbers) {
425
+ expect(number).toBeGreaterThan(value);
426
+ }
427
+ };
428
+
429
+ expectNumbersToBeGreaterThan(getNumbers(), 2);
430
+ });
431
+ ` ,
432
+ options : [ { onlyFunctionsWithExpectInLoop : true } ] ,
433
+ errors : [
434
+ {
435
+ messageId : 'haveExpectAssertions' ,
436
+ column : 1 ,
437
+ line : 1 ,
438
+ } ,
439
+ ] ,
440
+ } ,
434
441
{
435
442
code : dedent `
436
443
it("only returns numbers that are greater than seven", function () {
0 commit comments