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

eslint-plugin-mocha

Package Overview
Dependencies
Maintainers
1
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 0.1.1 to 0.2.0

15

lib/rules/no-exclusive-tests.js
module.exports = function (context) {
'use strict';
var mochaTestFunctions = [
'it',
'describe',
'suite',
'test'
];
function isCallToMochasOnlyFunction(callee) {
return callee.type === 'MemberExpression' &&
isObjectNamedItOrDescribe(callee.object) &&
isPropertyNamedOnly(callee.property);
matchesMochaTestFunction(callee.object) &&
isPropertyNamedOnly(callee.property);
}
function isObjectNamedItOrDescribe(object) {
return object && (object.name === 'it' || object.name === 'describe');
function matchesMochaTestFunction(object) {
return object && mochaTestFunctions.indexOf(object.name) !== -1;
}

@@ -13,0 +20,0 @@

{
"name": "eslint-plugin-mocha",
"version": "0.1.1",
"version": "0.2.0",
"description": "Eslint rules for mocha.",

@@ -14,10 +14,10 @@ "main": "index.js",

"devDependencies": {
"istanbul": "0.3.0",
"istanbul": "0.3.2",
"mocha": "1.21.4",
"eslint-tester": "0.2.0",
"eslint": "~0.8.0",
"eslint-tester": "0.2.1",
"eslint": "^0.8.0",
"coveralls": "2.11.1"
},
"peerDependencies": {
"eslint": "~0.8.0"
"eslint": "^0.8.0"
},

@@ -24,0 +24,0 @@ "repository": {

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