-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Here's what I'm trying to do:
import ice from "node-icecream"
const ic = ice({ outputFunction: log.debug });
// ...
const someVariable = ic(someFunctionCall());
And here's what I get:
SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (1:0)
79 |
80 | function mapStateToProps(state: State): StateProps {
> 81 | const { activeBuf } = ic(getActive(state));
| ^
82 |
83 | log.debug({ activeBuf });
84 |
at Parser.Object.<anonymous>.pp$4.raise (node_modules/node-icecream/node_modules/acorn/dist/acorn.js:2757:13)
at Parser.Object.<anonymous>.pp$1.parseStatement (node_modules/node-icecream/node_modules/acorn/dist/acorn.js:799:16)
at Parser.Object.<anonymous>.pp$1.parseTopLevel (node_modules/node-icecream/node_modules/acorn/dist/acorn.js:706:23)
at Parser.parse (node_modules/node-icecream/node_modules/acorn/dist/acorn.js:551:15)
at Object.parse (node_modules/node-icecream/node_modules/acorn/dist/acorn.js:5290:37)
(further are lines from my project)
It happens when I run tests through jest. My project uses Typescript and ts-jest
to run typescript test files.
Metadata
Metadata
Assignees
Labels
No labels