Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support all variations of describe, it, & test #792

Merged
merged 11 commits into from
Apr 5, 2021
Prev Previous commit
Next Next commit
test(no-test-return-statement): add cases for .each
  • Loading branch information
G-Rath committed Apr 4, 2021
commit e113082ddb8f973cd82161a5338b27fe577772c8
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