Skip to content

Commit

Permalink
test(no-test-return-statement): add cases for .each
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Apr 4, 2021
1 parent 2135704 commit e759b00
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/rules/__tests__/no-test-return-statement.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ ruleTester.run('no-test-return-statement', rule, {
`,
errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }],
},
{
code: dedent`
it.skip("one", function () {
return expect(1).toBe(1);
});
`,
errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }],
},
{
code: dedent`
it.each\`\`("one", function () {
return expect(1).toBe(1);
});
`,
errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }],
},
{
code: dedent`
it.only.each\`\`("one", function () {
return expect(1).toBe(1);
});
`,
errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }],
},
{
code: dedent`
it("one", myTest);
Expand Down

0 comments on commit e759b00

Please sign in to comment.