-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Description
I've just started using AVA and can't get my tests run when an import source function uses optional chaining.
I get this error:
Uncaught exception in service/__test__/business/entities/updateEntity/updateEntity.test.js
/some/path/modules/lib/src/getGraphQlError.js:2
const message = error?.response?.errors?.[0]?.message;
^
SyntaxError: Invalid or unexpected token
› SyntaxError: Invalid or unexpected token
› Object._compile (node_modules/pirates/lib/index.js:99:24)
My package.json looks like:
{
"name": "test",
"private": true,
"ava": {
"require": [
"esm",
"@babel/register"
],
"babel": true
},
"devDependencies": {
"@ava/babel": "2.0.0",
"@babel/register": "7.15.3",
"ava": "3.15.0",
"esm": "3.2.25"
}
}
I'm pretty sure I'm missing something obvious but I couldn't get a grip on it so far ...
Reactions are currently unavailable