Skip to content

Commit

Permalink
test(valid-title): 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 484de05 commit 5803d4b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/rules/__tests__/valid-title.test.ts
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

0 comments on commit 5803d4b

Please sign in to comment.