- Notifications
You must be signed in to change notification settings - Fork61
Closed
Description
Hi!
I have small problem with bs-jest.
In mybsconfig.json I have es6 modules:
"package-specs": { "module": "es6", "in-source": true },When I run tests, it gives me the error like below:
$ jest FAIL __tests__/Template_test.bs.js ● Test suite failed to run ....../node_modules/@glennsl/bs-jest/src/jest.js:3 import * as List from "bs-platform/lib/es6/list.js"; ^^^^^^ SyntaxError: Cannot use import statement outside a module 1 | // Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE 2 | > 3 | import * as Jest from "@glennsl/bs-jest/src/jest.js"; | ^ 4 | 5 | Jest.describe("TestSuite", (function (param) { 6 | return Jest.test("test", (function (param) { 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> (__tests__/Template_test.bs.js:3:1)Test Suites: 1 failed, 1 totalTests: 0 totalSnapshots: 0 totalTime: 0.468s, estimated 2sRan all test suites.When I changemodule tocommonjs, everything starts working. (I can't do this permamently, because I have own bindings, that not compatible withcommonjs)
Metadata
Metadata
Assignees
Labels
No labels