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 26.8.6 to 26.8.7

18

lib/rules/prefer-expect-assertions.js

@@ -35,4 +35,6 @@ "use strict";

const suggestions = [['suggestAddingHasAssertions', 'expect.hasAssertions();'], ['suggestAddingAssertions', 'expect.assertions();']];
// const suggestions: Array<[MessageIds, string]> = [
// ['suggestAddingHasAssertions', 'expect.hasAssertions();'],
// ['suggestAddingAssertions', 'expect.assertions();'],
// ];
var _default = (0, _utils2.createRule)({

@@ -217,10 +219,6 @@ name: __filename,

if (!(0, _utils2.isFunction)(testFn) || testFn.body.type !== _utils.AST_NODE_TYPES.BlockStatement) {
if (!(0, _utils2.isFunction)(testFn) || !shouldCheckFunction(testFn)) {
return;
}
if (!shouldCheckFunction(testFn)) {
return;
}
hasExpectInLoop = false;

@@ -234,2 +232,8 @@ hasExpectInCallback = false;

const suggestions = [];
if (testFn.body.type === _utils.AST_NODE_TYPES.BlockStatement) {
suggestions.push(['suggestAddingHasAssertions', 'expect.hasAssertions();'], ['suggestAddingAssertions', 'expect.assertions();']);
}
context.report({

@@ -236,0 +240,0 @@ messageId: 'haveExpectAssertions',

{
"name": "eslint-plugin-jest",
"version": "26.8.6",
"version": "26.8.7",
"description": "ESLint rules for Jest",

@@ -5,0 +5,0 @@ "keywords": [

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