Skip to content

Commit

Permalink
Test(web-react): Set Jest to automatically clear all mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Dec 10, 2024
1 parent ae79e54 commit 9f99b21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/web-react/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const config = {
// A list of paths to modules that run some code to configure or set up the testing framework before each test file in the suite is executed.
// https://jestjs.io/docs/configuration#setupfilesafterenv-array
setupFilesAfterEnv: ['<rootDir>/config/jest/setupTestingLibrary.ts'],

// Automatically clear mock calls, instances, contexts and results before every test.
// https://jestjs.io/docs/configuration#clearmocks-boolean
clearMocks: true,
};

export default config;

0 comments on commit 9f99b21

Please sign in to comment.