-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Steps to Trigger Behavior
- I run a test (using react-scripts test) that fails when running this line:
import DrawControl from 'react-mapbox-gl-draw'; - It fails saying:
`..../node_modules/@mapbox/mapbox-gl-draw/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import runSetup from './src/setup';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (../react-ui-components/node_modules/react-mapbox-gl-draw/lib/index.js:13:42)`
- I don't use mapbox-gl-draw directly, I use it using react-mapbox-gl-draw
Expected Behavior
Test shouldn't fail when importing mapbox-gl-draw
Actual Behavior
Test fails when importing mapbox-gl-draw
Notes
I belive it's related to this issue
"react-mapbox-gl": "^4.7.3",
"react-mapbox-gl-draw": "^2.0.3",
"@mapbox/mapbox-gl-draw": "^1.1.2",
"mapbox-gl": "^1.5.1",
browser: jsdom-fourteen provided by jest
nrgapple, doliolarzz and BaptisteMahe
Metadata
Metadata
Assignees
Labels
No labels