Skip to content

Commit 8aa67b3

Browse files
committed
fix: restoring mocked function properly
1 parent 69fe029 commit 8aa67b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/auth/login.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('commandAuthLogin', () => {
2727
let polykeyAgent: PolykeyAgent;
2828

2929
beforeEach(async () => {
30-
globalThis.fetch = jest.fn(() =>
30+
jest.spyOn(globalThis, 'fetch').mockImplementation(() =>
3131
Promise.resolve(
3232
new Response(JSON.stringify({ result: 'success' }), {
3333
status: 200,

0 commit comments

Comments
 (0)