app.js
export const temp = "Hello World";
app.test.js
import { temp } from "./app.js";
When I run npm test it throws "SyntaxError: Cannot use import statement outside a module"
This is the test script: {scripts: {test: "jest"}}
I've enabled ES modules by adding "type": "module" in package.json.