Skip to content

Commit

Permalink
Fix no-setup-in-describe to not flag describe.skip()
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed May 29, 2020
1 parent bb1bc45 commit d1ed7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/no-setup-in-describe.js
Expand Up @@ -83,7 +83,7 @@ module.exports = {
},

MemberExpression(node) {
if (isNestedInDescribeBlock()) {
if (!isDescribe(node.parent) && isNestedInDescribeBlock()) {
reportMemberExpression(node);
}
},
Expand Down
3 changes: 3 additions & 0 deletions test/rules/no-setup-in-describe.js
Expand Up @@ -19,6 +19,9 @@ ruleTester.run('no-setup-in-describe', rule, {
'it("", function () { a[b]; })',
'it("", function () { a["b"]; })',
'describe("", function () { it(); })',
'describe.skip("", function () { it(); })',
'describe.only("", function () { it(); })',
'describe["only"]("", function () { it(); })',
'describe("", function () { this.slow(1); it(); })',
'describe("", function () { this.timeout(1); it(); })',
'describe("", function () { this.retries(1); it(); })',
Expand Down

0 comments on commit d1ed7d4

Please sign in to comment.