Socket
Socket
Sign inDemoInstall

eslint-plugin-mocha

Package Overview
Dependencies
Maintainers
3
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-mocha - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 6.1.1 (September 11, 2019)
### Bug Fixes
* Fix no-setup-in-describe to allow Mocha suite config ([#209](https://github.com/lo1tuma/eslint-plugin-mocha/pull/209))
## 6.1.0 (August 22, 2019)

@@ -2,0 +8,0 @@

4

lib/rules/no-setup-in-describe.js

@@ -16,3 +16,5 @@ 'use strict';

function isPureNode(node) {
return astUtils.isHookCall(node) || astUtils.isTestCase(node);
return astUtils.isHookCall(node) ||
astUtils.isTestCase(node) ||
astUtils.isSuiteConfigCall(node);
}

@@ -19,0 +21,0 @@

@@ -14,2 +14,3 @@ 'use strict';

const hooks = [ 'before', 'after', 'beforeEach', 'afterEach', 'beforeAll', 'afterAll' ];
const suiteConfig = [ 'timeout', 'slow', 'retries' ];
const testCaseNames = [

@@ -47,2 +48,12 @@ 'it', 'it.only', 'it.skip', 'xit',

function isSuiteConfigExpression(node) {
return node.type === 'MemberExpression' &&
node.object.type === 'ThisExpression' &&
suiteConfig.indexOf(getPropertyName(node.property)) !== -1;
}
function isSuiteConfigCall(node) {
return isCallExpression(node) && isSuiteConfigExpression(node.callee);
}
function isTestCase(node) {

@@ -107,2 +118,3 @@ return isCallExpression(node) && testCaseNames.indexOf(getNodeName(node.callee)) > -1;

isHookCall,
isSuiteConfigCall,
isStringLiteral,

@@ -109,0 +121,0 @@ hasParentMochaFunctionCall,

{
"name": "eslint-plugin-mocha",
"version": "6.1.0",
"version": "6.1.1",
"description": "Eslint rules for mocha.",

@@ -5,0 +5,0 @@ "engines": {

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