Registry / testing / eslint-config-jest-enzyme

eslint-config-jest-enzyme

JSON →
library7.1.2jsnpmunverified

ESLint shareable config for jest-environment-enzyme globals. Current version 7.1.2, released August 2020. This package is part of the enzyme-matchers monorepo from Formidable Labs. It defines Jest and Enzyme global variables (e.g., mount, shallow, render) to prevent ESLint warnings when using jest-environment-enzyme. Only useful in combination with that environment. Low maintenance cadence; no major changes after v7.0.0.

npm install eslint-config-jest-enzyme
INSTALL
IMPORT
SIG · ESLINT-CONFIG-JEST
E
eslint-config-jest-enzyme
testingjavascriptv7.1.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extends
✓ { "extends": ["jest-enzyme"] }
✗ { "extends": ["eslint-config-jest-enzyme"] }
The preset is referenced as 'jest-enzyme', not the full npm package name.
jest-enzyme globals
✓ /* eslint-env jest-enzyme/globals */
✗ /* global mount, shallow */
Use the environment-specific directive to enable globals per file.
env
✓ { "env": { "jest-enzyme/globals": true } }
✗ { "env": { "jest": true } }
Setting 'jest' env alone does not include enzyme globals; use the jest-enzyme environment.

Configures ESLint to acknowledge jest-environment-enzyme globals like mount, shallow, render.

// .eslintrc.js module.exports = { extends: ['jest-enzyme'], env: { 'jest-enzyme/globals': true, }, rules: {}, };
Debug
Known issues
breakingv7.0.0: toHaveTagName renamed to toHaveDisplayName
fix
Replace all uses of toHaveTagName with toHaveDisplayName.
affects: >=7.0.0
deprecatedPackage is in maintenance mode with no active development
fix
Consider migrating to @testing-library/jest-dom or custom ESLint rules.
affects: >=7.0.0
gotchaESLint config only applies to test files ending in *.test.js
fix
Ensure test files match the pattern or override overrides in config.
affects: >=7.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-config-jest-enzyme'
Missing dependency.
fix
Run npm install eslint-config-jest-enzyme --save-dev
Definition for rule 'jest-enzyme' was not found
Extending 'jest-enzyme' without also installing the jest-enzyme plugin.
fix
Install eslint-plugin-jest-enzyme or ensure the correct extends value.
Upgrade
Version history
7.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-jest-enzyme — npm install eslint-config-jest-enzyme · libregistry