Skip to content

Commit

Permalink
Merge pull request #256 from lo1tuma/gh-249
Browse files Browse the repository at this point in the history
Fix no-setup-in-describe to not flag describe.skip()
  • Loading branch information
lo1tuma authored May 30, 2020
2 parents 35dfc76 + d1ed7d4 commit 344a6f6
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 344a6f6

Please sign in to comment.