Skip to content

Commit 012fe83

Browse files
committed
chore: add node-fetch for testing
1 parent 6fc1fa5 commit 012fe83

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

jest.setup.js

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
// https://github.com/facebook/react/issues/20756#issuecomment-780927519
66
// eslint-disable-next-line no-undef
77
delete global.MessageChannel;
8+
// eslint-disable-next-line no-undef
9+
global.fetch = require('node-fetch');

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"eslint-config-prettier": "^8.5.0",
5353
"jest": "^29.4.3",
5454
"lerna": "^5.1.6",
55+
"node-fetch": "2.x",
5556
"patch-package": "^6.4.7",
5657
"postinstall-postinstall": "^2.1.0",
5758
"prettier": "^2.7.1",

yarn.lock

+7
Original file line numberDiff line numberDiff line change
@@ -11440,6 +11440,13 @@ [email protected]:
1144011440
dependencies:
1144111441
whatwg-url "^5.0.0"
1144211442

11443+
11444+
version "2.6.12"
11445+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba"
11446+
integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==
11447+
dependencies:
11448+
whatwg-url "^5.0.0"
11449+
1144311450
node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
1144411451
version "2.6.9"
1144511452
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6"

0 commit comments

Comments
 (0)