source: frontend/node_modules/eslint-plugin-jest/docs/rules/no-jest-import.md

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 719 bytes
Line 
1# Disallow importing Jest (`no-jest-import`)
2
3The `jest` object is automatically in scope within every test file. The methods
4in the `jest` object help create mocks and let you control Jest's overall
5behavior. It is therefore completely unnecessary to import in `jest`, as Jest
6doesn't export anything in the first place.
7
8### Rule details
9
10This rule reports on any importing of Jest.
11
12To name a few: `var jest = require('jest');` `const jest = require('jest');`
13`import jest from 'jest';` `import {jest as test} from 'jest';`
14
15There is no correct usage of this code, other than to not import `jest` in the
16first place.
17
18## Further Reading
19
20\*[The Jest Object](https://facebook.github.io/jest/docs/en/jest-object.html)
Note: See TracBrowser for help on using the repository browser.