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 11, 2021
1 parent e3f836f commit 88f896b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/rules/__tests__/no-test-return-statement.test.ts
Expand Up @@ -68,6 +68,14 @@ ruleTester.run('no-test-return-statement', rule, {
`,
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 () {
Expand All @@ -76,6 +84,14 @@ ruleTester.run('no-test-return-statement', rule, {
`,
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 88f896b

Please sign in to comment.