I am trying to include Ava (migrating from a mocha) as my test runner for a reaction / electron application.
I have this config in my package.json
"ava": {
"files": [
"./app/**/*.spec.js"
],
"source": [
"./app/**/*.{js,jsx}"
],
"concurrency": 5,
"failFast": true,
"require": [
"babel-register",
"ignore-styles",
"./app/test/setup.js"
],
"babel": {
"presets": [
"es2015",
"react"
]
}
},
With my setup.js, just being an assistant to configure jsdom.
I get an error message:
(function (exports, require, module, __filename, __dirname) { import { jsdom } from 'jsdom';
^^^^^^
SyntaxError: Unexpected token import
So it seems that it is babel-registernot required properly.
Carlo source
share