Can't import module due to ES6 syntax: "unexpected token export"

I’m trying to run unit tests on my app, but I keep getting an error:

[Error] There was a problem loading [/app/as-pect.config.js].
export async function instantiate(source, imports = {}) {

SyntaxError: Unexpected token export

Since it’s a 3rd party module, I can’t change how the module imports/exports so NodeJS v12.x can handle it.

Any suggestions? Thanks

Hiya humanman, welcome to the forum!

Not sure if this will work, but could you try adding

"type" : "module"

to your package.json?