- Having a better overview of mocks
- Have a more readable test file
- using a different way to organize the mocks (like
jest-mock-directly-above-jest-mocked
) - don't want to have a strict grouping of mocks
code:
jest.mock('../some/path/to/file');
jest.mock('../some/path/to/other/file');
code:
jest.mock('../some/path/to/file');
// some other code
// ...
jest.mock('../some/path/to/other/file');
This ESLint rule is pretty simple. It currently has no configuration.
'jest-mock-grouped': 'error',