Files
dewedev/node_modules/eslint-plugin-jest/docs/rules/no-jest-import.md
dwindown 7f2dd5260f Initial commit: Developer Tools MVP with visual editor
- Complete React app with 7 developer tools
- JSON Tool with visual structured editor
- Serialize Tool with visual structured editor
- URL, Base64, CSV/JSON, Beautifier, Diff tools
- Responsive navigation with dropdown menu
- Dark/light mode toggle
- Mobile-responsive design with sticky header
- All tools working with copy/paste functionality
2025-08-02 09:31:26 +07:00

719 B

Disallow importing Jest (no-jest-import)

The jest object is automatically in scope within every test file. The methods in the jest object help create mocks and let you control Jest's overall behavior. It is therefore completely unnecessary to import in jest, as Jest doesn't export anything in the first place.

Rule details

This rule reports on any importing of Jest.

To name a few: var jest = require('jest'); const jest = require('jest'); import jest from 'jest'; import {jest as test} from 'jest';

There is no correct usage of this code, other than to not import jest in the first place.

Further Reading

*The Jest Object