Repository: lo1tuma/eslint-plugin-mocha (ts)

Issue:
`no-setup-in-describe` triggers on `describe.skip`
```js
describe.skip( 'My test', () => {
  it( 'Something', () => {
    // Foo
  } );
} );
```

This should not trigger `no-setup-in-describe`, yet it does.

This can be worked around by moving the `skip` to each of the `it` calls.

Pull request:
Fix no-setup-in-describe to not flag describe.skip()
Fixes #249.

Patch:
diff --git a/lib/rules/no-setup-in-describe.js b/lib/rules/no-setup-in-describe.js
index 3a872f1..4383b69 100644
--- a/lib/rules/no-setup-in-describe.js
+++ b/lib/rules/no-setup-in-describe.js
@@ -83,7 +83,7 @@ module.exports = {
             },
 
             MemberExpression(node) {
-                if (isNestedInDescribeBlock()) {
+                if (!isDescribe(node.parent) && isNestedInDescribeBlock()) {
                     reportMemberExpression(node);
                 }
             },


Test patch:
diff --git a/test/rules/no-setup-in-describe.js b/test/rules/no-setup-in-describe.js
index 52915de..63139e5 100644
--- a/test/rules/no-setup-in-describe.js
+++ b/test/rules/no-setup-in-describe.js
@@ -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(); })',