Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
include fetch in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmgdr committed Apr 25, 2023
1 parent 18b2590 commit 2a11252
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import '@testing-library/jest-dom';

import fetch from 'isomorphic-fetch';
import { TextDecoder, TextEncoder } from 'util';

if (typeof window !== 'undefined' && !('TextEncoder' in window)) {
Expand All @@ -20,3 +21,5 @@ if (typeof window !== 'undefined' && !('TextEncoder' in window)) {
value: TextDecoder,
});
}

global['fetch'] = fetch;

0 comments on commit 2a11252

Please sign in to comment.