diff --git a/code/addons/test/src/manager.tsx b/code/addons/test/src/manager.tsx index dbc8f18fa1de..26a8c8f42cd7 100644 --- a/code/addons/test/src/manager.tsx +++ b/code/addons/test/src/manager.tsx @@ -79,7 +79,8 @@ addons.register(ADDON_ID, (api) => { details: { ...state.details, ...update.details }, }; - if (update.config?.coverage === false) { + if ((!state.running && update.running) || (!state.watching && update.watching)) { + // Clear coverage data when starting test run or enabling watch mode delete updated.details.coverageSummary; }