From 5803d4b79d42a9c5dde6e5d7c6bcd25db9757c18 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 5 Apr 2021 10:39:11 +1200 Subject: [PATCH] test(valid-title): add cases for `.each` --- src/rules/__tests__/valid-title.test.ts | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/rules/__tests__/valid-title.test.ts b/src/rules/__tests__/valid-title.test.ts index 5d703bb9d..c0e30d2b7 100644 --- a/src/rules/__tests__/valid-title.test.ts +++ b/src/rules/__tests__/valid-title.test.ts @@ -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: [ @@ -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 () {})',