Skip to content

Commit

Permalink
test: clean all mocks before each
Browse files Browse the repository at this point in the history
  • Loading branch information
toomuchdesign committed Dec 6, 2023
1 parent 25ae099 commit 3997061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ beforeAll(() => {
identityFunctionCheck: 'never',
});
});

beforeEach(() => {
jest.clearAllMocks();
});
5 changes: 0 additions & 5 deletions src/__tests__/createCachedSelector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ const consoleWarnSpy = jest
.mockImplementation(() => {});
const resultFuncMock = () => undefined;

beforeEach(() => {
consoleWarnSpy.mockClear();
createSelectorSpy.mockClear();
});

function selectorWithMockedResultFunc() {
return createCachedSelector(
[],
Expand Down

0 comments on commit 3997061

Please sign in to comment.