@@ -1501,6 +1501,24 @@ ruleTester.run('.each support', rule, {
15011501 messageId : 'haveExpectAssertions' ,
15021502 column : 1 ,
15031503 line : 1 ,
1504+ suggestions : [
1505+ {
1506+ messageId : 'suggestAddingHasAssertions' ,
1507+ output : dedent `
1508+ test.each()("is not fine", () => {expect.hasAssertions();
1509+ expect(someValue).toBe(true);
1510+ });
1511+ ` ,
1512+ } ,
1513+ {
1514+ messageId : 'suggestAddingAssertions' ,
1515+ output : dedent `
1516+ test.each()("is not fine", () => {expect.assertions();
1517+ expect(someValue).toBe(true);
1518+ });
1519+ ` ,
1520+ } ,
1521+ ] ,
15041522 } ,
15051523 ] ,
15061524 } ,
@@ -1517,6 +1535,28 @@ ruleTester.run('.each support', rule, {
15171535 messageId : 'haveExpectAssertions' ,
15181536 column : 3 ,
15191537 line : 2 ,
1538+ suggestions : [
1539+ {
1540+ messageId : 'suggestAddingHasAssertions' ,
1541+ output : dedent `
1542+ describe.each()('something', () => {
1543+ it("is not fine", () => {expect.hasAssertions();
1544+ expect(someValue).toBe(true);
1545+ });
1546+ });
1547+ ` ,
1548+ } ,
1549+ {
1550+ messageId : 'suggestAddingAssertions' ,
1551+ output : dedent `
1552+ describe.each()('something', () => {
1553+ it("is not fine", () => {expect.assertions();
1554+ expect(someValue).toBe(true);
1555+ });
1556+ });
1557+ ` ,
1558+ } ,
1559+ ] ,
15201560 } ,
15211561 ] ,
15221562 } ,
@@ -1533,6 +1573,28 @@ ruleTester.run('.each support', rule, {
15331573 messageId : 'haveExpectAssertions' ,
15341574 column : 3 ,
15351575 line : 2 ,
1576+ suggestions : [
1577+ {
1578+ messageId : 'suggestAddingHasAssertions' ,
1579+ output : dedent `
1580+ describe.each()('something', () => {
1581+ test.each()("is not fine", () => {expect.hasAssertions();
1582+ expect(someValue).toBe(true);
1583+ });
1584+ });
1585+ ` ,
1586+ } ,
1587+ {
1588+ messageId : 'suggestAddingAssertions' ,
1589+ output : dedent `
1590+ describe.each()('something', () => {
1591+ test.each()("is not fine", () => {expect.assertions();
1592+ expect(someValue).toBe(true);
1593+ });
1594+ });
1595+ ` ,
1596+ } ,
1597+ ] ,
15361598 } ,
15371599 ] ,
15381600 } ,
@@ -1548,6 +1610,24 @@ ruleTester.run('.each support', rule, {
15481610 messageId : 'haveExpectAssertions' ,
15491611 column : 1 ,
15501612 line : 1 ,
1613+ suggestions : [
1614+ {
1615+ messageId : 'suggestAddingHasAssertions' ,
1616+ output : dedent `
1617+ test.each()("is not fine", async () => {expect.hasAssertions();
1618+ expect(someValue).toBe(true);
1619+ });
1620+ ` ,
1621+ } ,
1622+ {
1623+ messageId : 'suggestAddingAssertions' ,
1624+ output : dedent `
1625+ test.each()("is not fine", async () => {expect.assertions();
1626+ expect(someValue).toBe(true);
1627+ });
1628+ ` ,
1629+ } ,
1630+ ] ,
15511631 } ,
15521632 ] ,
15531633 } ,
@@ -1563,6 +1643,24 @@ ruleTester.run('.each support', rule, {
15631643 messageId : 'haveExpectAssertions' ,
15641644 column : 1 ,
15651645 line : 1 ,
1646+ suggestions : [
1647+ {
1648+ messageId : 'suggestAddingHasAssertions' ,
1649+ output : dedent `
1650+ it.each()("is not fine", async () => {expect.hasAssertions();
1651+ expect(someValue).toBe(true);
1652+ });
1653+ ` ,
1654+ } ,
1655+ {
1656+ messageId : 'suggestAddingAssertions' ,
1657+ output : dedent `
1658+ it.each()("is not fine", async () => {expect.assertions();
1659+ expect(someValue).toBe(true);
1660+ });
1661+ ` ,
1662+ } ,
1663+ ] ,
15661664 } ,
15671665 ] ,
15681666 } ,
@@ -1580,6 +1678,28 @@ ruleTester.run('.each support', rule, {
15801678 messageId : 'haveExpectAssertions' ,
15811679 column : 3 ,
15821680 line : 2 ,
1681+ suggestions : [
1682+ {
1683+ messageId : 'suggestAddingHasAssertions' ,
1684+ output : dedent `
1685+ describe.each()('something', () => {
1686+ test.each()("is not fine", async () => {expect.hasAssertions();
1687+ expect(someValue).toBe(true);
1688+ });
1689+ });
1690+ ` ,
1691+ } ,
1692+ {
1693+ messageId : 'suggestAddingAssertions' ,
1694+ output : dedent `
1695+ describe.each()('something', () => {
1696+ test.each()("is not fine", async () => {expect.assertions();
1697+ expect(someValue).toBe(true);
1698+ });
1699+ });
1700+ ` ,
1701+ } ,
1702+ ] ,
15831703 } ,
15841704 ] ,
15851705 } ,
0 commit comments