- 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:
const someObjectMock = jest.mocked(someObject);
const someOtherObjectMock = jest.mocked(someOtherObject);
code:
const someObjectMock = jest.mocked(someObject);
// some other code
// ...
const someOtherObjectMock = jest.mocked(someOtherObject);
This ESLint rule is pretty simple. It currently has no configuration.
'jest-mocked-grouped': 'error',