core-js: Test error after upgrading to corejs 3
After using {corejs: 3}
option for both @babel/preset-env
and @babel/plugin-transform-runtime
, and using @babel/runtime-corejs3
, my tests are failing with the following error:
/node_modules/core-js-pure/internals/well-known-symbol.js:10
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
^
TypeError: Cannot read property 'iterator' of undefined
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (9 by maintainers)
You should you
corejs: 3
in@babel/preset-env
OR in@babel/plugin-transform-runtime
, but not together.@nicolo-ribaudo already answered to this question.
Interesting. So, seems you use mocked
window
and, because ofwindow.Math === Math
, it passes current global object detection. But it’s not a real global object, so you try to usecore-js
in a broken environment. You should usecore-js
before that. Seems the issue resolved.Ok, let say in other words: you should use
useBuiltIns
option ofpreset-env
ORcorejs
option ofruntime
, but not together.