Skip to content

Commit 5803d4b

Browse files
committed
test(valid-title): add cases for .each
1 parent 484de05 commit 5803d4b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/rules/__tests__/valid-title.test.ts

+30
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,26 @@ ruleTester.run('title-must-be-string', rule, {
353353
},
354354
],
355355
},
356+
{
357+
code: 'it.skip.each([])(1, () => {});',
358+
errors: [
359+
{
360+
messageId: 'titleMustBeString',
361+
column: 18,
362+
line: 1,
363+
},
364+
],
365+
},
366+
{
367+
code: 'it.skip.each``(1, () => {});',
368+
errors: [
369+
{
370+
messageId: 'titleMustBeString',
371+
column: 16,
372+
line: 1,
373+
},
374+
],
375+
},
356376
{
357377
code: 'it(123, () => {});',
358378
errors: [
@@ -658,6 +678,16 @@ ruleTester.run('no-accidental-space', rule, {
658678
output: 'describe("foo", function () {})',
659679
errors: [{ messageId: 'accidentalSpace', column: 10, line: 1 }],
660680
},
681+
{
682+
code: 'describe.each()(" foo", function () {})',
683+
output: 'describe.each()("foo", function () {})',
684+
errors: [{ messageId: 'accidentalSpace', column: 17, line: 1 }],
685+
},
686+
{
687+
code: 'describe.only.each()(" foo", function () {})',
688+
output: 'describe.only.each()("foo", function () {})',
689+
errors: [{ messageId: 'accidentalSpace', column: 22, line: 1 }],
690+
},
661691
{
662692
code: 'describe(" foo foe fum", function () {})',
663693
output: 'describe("foo foe fum", function () {})',

0 commit comments

Comments
 (0)