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(valid-title): add cases for .each
  • Loading branch information
G-Rath committed Apr 4, 2021
commit 5803d4b79d42a9c5dde6e5d7c6bcd25db9757c18
30 changes: 30 additions & 0 deletions src/rules/__tests__/valid-title.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,26 @@ ruleTester.run('title-must-be-string', rule, {
},
],
},
{
code: 'it.skip.each([])(1, () => {});',
errors: [
{
messageId: 'titleMustBeString',
column: 18,
line: 1,
},
],
},
{
code: 'it.skip.each``(1, () => {});',
errors: [
{
messageId: 'titleMustBeString',
column: 16,
line: 1,
},
],
},
{
code: 'it(123, () => {});',
errors: [
Expand Down Expand Up @@ -658,6 +678,16 @@ ruleTester.run('no-accidental-space', rule, {
output: 'describe("foo", function () {})',
errors: [{ messageId: 'accidentalSpace', column: 10, line: 1 }],
},
{
code: 'describe.each()(" foo", function () {})',
output: 'describe.each()("foo", function () {})',
errors: [{ messageId: 'accidentalSpace', column: 17, line: 1 }],
},
{
code: 'describe.only.each()(" foo", function () {})',
output: 'describe.only.each()("foo", function () {})',
errors: [{ messageId: 'accidentalSpace', column: 22, line: 1 }],
},
{
code: 'describe(" foo foe fum", function () {})',
output: 'describe("foo foe fum", function () {})',
Expand Down