Socket
Socket
Sign inDemoInstall

eslint-plugin-jest

Package Overview
Dependencies
Maintainers
11
Versions
325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest - npm Package Compare versions

Comparing version 22.7.0 to 22.7.1

2

lib/rules/__tests__/no-empty-title.js

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

ruleTester.run('no-empty-title', rule, {
valid: ['someFn("", function () {})', 'describe(1, function () {})', 'describe("foo", function () {})', 'describe("foo", function () { it("bar", function () {}) })', 'test("foo", function () {})', 'test(`foo`, function () {})', 'test(`${foo}`, function () {})', "it('foo', function () {})", "xdescribe('foo', function () {})", "xit('foo', function () {})", "xtest('foo', function () {})"],
valid: ['describe()', 'someFn("", function () {})', 'describe(1, function () {})', 'describe("foo", function () {})', 'describe("foo", function () { it("bar", function () {}) })', 'test("foo", function () {})', 'test(`foo`, function () {})', 'test(`${foo}`, function () {})', "it('foo', function () {})", "xdescribe('foo', function () {})", "xit('foo', function () {})", "xtest('foo', function () {})"],
invalid: [{

@@ -17,0 +17,0 @@ code: 'describe("", function () {})',

@@ -82,11 +82,11 @@ 'use strict';

const isDescribe = node => node.type === 'CallExpression' && describeAliases[getNodeName(node.callee)];
const isDescribe = node => node && node.type === 'CallExpression' && describeAliases[getNodeName(node.callee)];
const isFunction = node => node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression';
const isFunction = node => node && (node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression');
const isString = node => node.type === 'Literal' && typeof node.value === 'string' || isTemplateLiteral(node);
const isString = node => node && (node.type === 'Literal' && typeof node.value === 'string' || isTemplateLiteral(node));
const isTemplateLiteral = node => node.type === 'TemplateLiteral';
const isTemplateLiteral = node => node && node.type === 'TemplateLiteral';
const hasExpressions = node => node.expressions && node.expressions.length > 0;
const hasExpressions = node => node && node.expressions && node.expressions.length > 0;

@@ -93,0 +93,0 @@ const getStringValue = arg => isTemplateLiteral(arg) ? arg.quasis[0].value.raw : arg.value;

{
"name": "eslint-plugin-jest",
"version": "22.7.0",
"version": "22.7.1",
"description": "Eslint rules for Jest",

@@ -5,0 +5,0 @@ "repository": "jest-community/eslint-plugin-jest",

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

valid: [
'describe()',
'someFn("", function () {})',

@@ -16,0 +17,0 @@ 'describe(1, function () {})',

@@ -128,14 +128,20 @@ 'use strict';

const isDescribe = node =>
node.type === 'CallExpression' && describeAliases[getNodeName(node.callee)];
node &&
node.type === 'CallExpression' &&
describeAliases[getNodeName(node.callee)];
const isFunction = node =>
node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression';
node &&
(node.type === 'FunctionExpression' ||
node.type === 'ArrowFunctionExpression');
const isString = node =>
(node.type === 'Literal' && typeof node.value === 'string') ||
isTemplateLiteral(node);
node &&
((node.type === 'Literal' && typeof node.value === 'string') ||
isTemplateLiteral(node));
const isTemplateLiteral = node => node.type === 'TemplateLiteral';
const isTemplateLiteral = node => node && node.type === 'TemplateLiteral';
const hasExpressions = node => node.expressions && node.expressions.length > 0;
const hasExpressions = node =>
node && node.expressions && node.expressions.length > 0;

@@ -142,0 +148,0 @@ const getStringValue = arg =>

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