mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Chore: Add whatwg-fetch polyfill to admin-test-utils
This commit is contained in:
parent
e4c0d0bf19
commit
e86facb7bd
@ -43,6 +43,7 @@ module.exports = {
|
||||
globalSetup: '<rootDir>/test/config/front/global-setup.js',
|
||||
setupFiles: [
|
||||
'<rootDir>/packages/admin-test-utils/lib/setup/test-bundler.js',
|
||||
'<rootDir>/packages/admin-test-utils/lib/mocks/fetch.js',
|
||||
'<rootDir>/packages/admin-test-utils/lib/mocks/LocalStorageMock.js',
|
||||
'<rootDir>/packages/admin-test-utils/lib/mocks/IntersectionObserver.js',
|
||||
'<rootDir>/packages/admin-test-utils/lib/mocks/ResizeObserver.js',
|
||||
|
||||
4
packages/admin-test-utils/lib/mocks/fetch.js
Normal file
4
packages/admin-test-utils/lib/mocks/fetch.js
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
// Required as long as we are running tests on node@14 and node@16
|
||||
require('whatwg-fetch');
|
||||
@ -24,7 +24,8 @@
|
||||
"react-dom": "^17.0.2",
|
||||
"react-is": "^17.0.2",
|
||||
"redux": "^4.2.1",
|
||||
"styled-components": "5.3.3"
|
||||
"styled-components": "5.3.3",
|
||||
"whatwg-fetch": "3.6.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"redux": "^4.2.1"
|
||||
|
||||
@ -22579,6 +22579,11 @@ whatwg-encoding@^2.0.0:
|
||||
dependencies:
|
||||
iconv-lite "0.6.3"
|
||||
|
||||
whatwg-fetch@3.6.2:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
|
||||
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==
|
||||
|
||||
whatwg-mimetype@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user