mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Chore: Polyfill core-js/array/at for frontend tests
This commit is contained in:
parent
a9613ef178
commit
9e47dd0356
@ -73,6 +73,7 @@
|
||||
"babel-eslint": "10.1.0",
|
||||
"chalk": "4.1.2",
|
||||
"chokidar": "3.5.3",
|
||||
"core-js": "3.26.1",
|
||||
"cross-env": "7.0.3",
|
||||
"dotenv": "14.2.0",
|
||||
"eslint": "8.27.0",
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
// See https://github.com/swc-project/swc/issues/6460
|
||||
// SWC is not able to include the core-js polyfill for
|
||||
// array/at automatically at the moment of writing, which
|
||||
// makes some frontend tests fail on node@14.
|
||||
require('core-js/actual/array/at');
|
||||
|
||||
const noop = () => {};
|
||||
// eslint-disable-next-line no-undef
|
||||
Object.defineProperty(window, 'scrollTo', { value: noop, writable: true });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user