Skip to content
Prev Previous commit
Next Next commit
reset all gives back the previous state
  • Loading branch information
feliperli committed Jan 2, 2023
commit a7efd834c0bc4f1c3786ff4fd1a59708950a2bd4
1 change: 1 addition & 0 deletions packages/jest-mock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ export class ModuleMocker {
}

resetAllMocks(): void {
this._spyState.forEach(reset => reset());
this._mockConfigRegistry = new WeakMap();
this._mockState = new WeakMap();
}
Expand Down