eslint-plugin-jasmine
Advanced tools
Comparing version 2.8.4 to 2.8.5
@@ -8,4 +8,5 @@ 'use strict' | ||
var suiteRegexp = /^(f|d|x)?describe$/ | ||
var suiteRegexp = /^(f|d|x)?describe(\..*$)?/ | ||
var setupRegexp = /^(before|after)(Each|All)$/ | ||
var getName = require('../helpers/getName') | ||
@@ -19,3 +20,3 @@ module.exports = function (context) { | ||
CallExpression: function (node) { | ||
if (suiteRegexp.test(node.callee.name)) { | ||
if (suiteRegexp.test(getName(node.callee))) { | ||
hasRootSuite = true | ||
@@ -35,3 +36,3 @@ suiteDepth++ | ||
'CallExpression:exit': function (node) { | ||
if (suiteRegexp.test(node.callee.name)) { | ||
if (suiteRegexp.test(getName(node.callee))) { | ||
suiteDepth-- | ||
@@ -38,0 +39,0 @@ } |
@@ -54,3 +54,3 @@ { | ||
}, | ||
"version": "2.8.4" | ||
"version": "2.8.5" | ||
} |
@@ -5,5 +5,7 @@ 'use strict' | ||
var RuleTester = require('eslint').RuleTester | ||
const parserOptions = { | ||
ecmaVersion: 8 | ||
} | ||
var eslintTester = new RuleTester({parserOptions}) | ||
var eslintTester = new RuleTester() | ||
eslintTester.run('no-global-setup', rule, { | ||
@@ -15,3 +17,9 @@ valid: [{ | ||
}, { | ||
code: 'beforeEach(function() {}); afterEach(function() {})' | ||
code: `describe.only("suite", () => { | ||
beforeAll (() => { var a = 1; }); | ||
});` | ||
}, { | ||
code: `describe['only']("suite", () => { | ||
beforeAll (() => { var a = 1; }); | ||
});` | ||
}], | ||
@@ -18,0 +26,0 @@ invalid: [{ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174042
63
2283