I'm trying to add AVA tests to a project and my tests are not parsing ES2015 modules correctly with my Babel setup. What is odd to me is the import
s are working fine and if I run my npm run build
and run the output from the REPL it works...so it seems that AVA is not transpiling export
statements correctly or something is wrong with my config in my package.json
? I've tried reading through the docs and looking at other examples without success.
checkout
the tests
branchnpm install
npm test
Get an error (screenshot below) - ES2015 module export
error on line 7 of getURLSlug
:
Add "require": ["babel-register"] to the AVA configuration in your package.json