Skip to content

Commit

Permalink
fix(no-disabled-tests): support describe.skip.each & `xdescribe.eac…
Browse files Browse the repository at this point in the history
…h` (#778)
  • Loading branch information
G-Rath committed Mar 6, 2021
1 parent 92a8826 commit 6a32e87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rules/__tests__/no-disabled-tests.test.ts
Expand Up @@ -67,6 +67,14 @@ ruleTester.run('no-disabled-tests', rule, {
code: 'describe.skip("foo", function () {})',
errors: [{ messageId: 'skippedTestSuite', column: 1, line: 1 }],
},
{
code: 'describe.skip.each([1, 2, 3])("%s", (a, b) => {});',
errors: [{ messageId: 'skippedTestSuite', column: 1, line: 1 }],
},
{
code: 'xdescribe.each([1, 2, 3])("%s", (a, b) => {});',
errors: [{ messageId: 'skippedTestSuite', column: 1, line: 1 }],
},
{
code: 'describe[`skip`]("foo", function () {})',
errors: [{ messageId: 'skippedTestSuite', column: 1, line: 1 }],
Expand Down
2 changes: 2 additions & 0 deletions src/rules/no-disabled-tests.ts
Expand Up @@ -45,6 +45,8 @@ export default createRule({
}

switch (functionName) {
case 'describe.skip.each':
case 'xdescribe.each':
case 'describe.skip':
context.report({ messageId: 'skippedTestSuite', node });
break;
Expand Down

0 comments on commit 6a32e87

Please sign in to comment.