Browse Source

test(ui): Jest clear mocks between tests (#53585)

Scott Cooper 1 year ago
parent
commit
3b53ee2e65
1 changed files with 5 additions and 0 deletions
  1. 5 0
      jest.config.ts

+ 5 - 0
jest.config.ts

@@ -271,6 +271,11 @@ const config: Config.InitialOptions = {
       },
     ],
   ],
+  /**
+   * jest.clearAllMocks() automatically called before each test
+   * @link - https://jestjs.io/docs/configuration#clearmocks-boolean
+   */
+  clearMocks: true,
 
   testEnvironment: '<rootDir>/tests/js/instrumentedEnv',
   testEnvironmentOptions: {