Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-jasmine

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jasmine - npm Package Compare versions

Comparing version 2.8.4 to 2.8.5

lib/helpers/getName.js

7

lib/rules/no-global-setup.js

@@ -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: [{

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc