Skip to content

Commit

Permalink
Clear coverageSummary when starting test run or enabling watch mode
Browse files Browse the repository at this point in the history
ghengeveld committed Dec 16, 2024
1 parent cf1e4a7 commit 0ca7b7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/addons/test/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 0ca7b7c

Please sign in to comment.