We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a4de21 commit 79498daCopy full SHA for 79498da
1 file changed
packages/clients/fetch-client/test/fetch-client.test.ts
@@ -18,13 +18,15 @@ function makeSerializedResponseText(data: unknown) {
18
19
describe('createClient', () => {
20
let mockFetch: ReturnType<typeof vi.fn>;
21
+ const originalFetch = globalThis.fetch;
22
23
beforeEach(() => {
24
mockFetch = vi.fn();
25
globalThis.fetch = mockFetch as unknown as typeof globalThis.fetch;
26
});
27
28
afterEach(() => {
29
+ globalThis.fetch = originalFetch;
30
vi.resetAllMocks();
31
32
0 commit comments