From 2c1d4343311d2e77e615ee37df5bcce720ed9c85 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Tue, 11 Dec 2018 12:18:42 +0100 Subject: [PATCH] Automatically restore all Jest mocks after each test see https://jestjs.io/docs/en/configuration.html#restoremocks-boolean --- jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.config.js b/jest.config.js index 8e4f207af64..23554a117f6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -25,4 +25,5 @@ module.exports = { modulePathIgnorePatterns: ['/.yarn-cache/'], reporters, setupTestFrameworkScriptFile: '/spec/frontend/test_setup.js', + restoreMocks: true, };