From 12f87f54e5104166c713a7b609d6591a44f975a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Verit=C3=A9=20Mugabo?= Date: Sun, 9 Jul 2023 18:15:36 +0300 Subject: [PATCH] chore: no-commented-out-tests (#206) --- src/rules/no-commented-out-tests.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rules/no-commented-out-tests.ts b/src/rules/no-commented-out-tests.ts index 348a0d3..d477607 100644 --- a/src/rules/no-commented-out-tests.ts +++ b/src/rules/no-commented-out-tests.ts @@ -6,9 +6,7 @@ export type MESSAGE_IDS = 'noCommentedOutTests'; export type Options = []; function hasTests(node: TSESTree.Comment) { - return /^\s*[xf]?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/mu.test( - node.value - ) + return /^\s*[xf]?(test|it|describe)(\.\w+|\[['"]\w+['"]\])?\s*\(/mu.test(node.value) } export default createEslintRule({ @@ -20,7 +18,7 @@ export default createEslintRule({ recommended: 'warn' }, messages: { - noCommentedOutTests: 'Remove commented out tests' + noCommentedOutTests: 'Remove commented out tests. You may want to use `skip` or `only` instead.' }, schema: [], type: 'suggestion'