Skip to content

Commit db25345

Browse files
author
John Doe
committed
refactor: add mock clear
1 parent 69bee31 commit db25345

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/test-setup/src/lib/process.setup-file.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { afterEach, beforeEach, vi } from 'vitest';
33

44
export const MOCK_PID = 10_001;
55

6-
let processMock = vi.spyOn(process, 'pid', 'get');
6+
const processMock = vi.spyOn(process, 'pid', 'get');
77
beforeEach(() => {
88
processMock.mockReturnValue(MOCK_PID);
99
});
1010

1111
afterEach(() => {
12-
processMock.mockRestore();
12+
processMock.mockClear();
1313
});

0 commit comments

Comments
 (0)