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 48528d9 commit 223e6a2
Showing 1 changed file with 30 additions and 0 deletions.
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

0 comments on commit 223e6a2

Please sign in to comment.