https://github.com/dlebedynskyi/ava-issue-1093
code sample for https://github.com/avajs/ava/issues/1093
https://github.com/dlebedynskyi/ava-issue-1093
Last synced: about 1 month ago
JSON representation
code sample for https://github.com/avajs/ava/issues/1093
- Host: GitHub
- URL: https://github.com/dlebedynskyi/ava-issue-1093
- Owner: dlebedynskyi
- License: mit
- Created: 2016-12-13T15:49:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-13T16:22:33.000Z (over 8 years ago)
- Last Synced: 2025-01-29T12:13:17.142Z (3 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ava-issue-1139
code sample for https://github.com/avajs/ava/issues/1139## Fail Test Case
1. run
```shell
npm run test
```
ava will fail to compile with simmilar Error```
/Users/dlebedynskyi/Documents/Code/ava-issue-1093/src/demo.js:1
(function (exports, require, module, __filename, __dirname) { import func from './func';
^^^^^^
SyntaxError: Unexpected token import
```## Success Run
2. rename .working.babelrc to .babelrc and replace ava config with
```
"ava": {
"files": [
"test/**/*.spec.js"
],
"source": [
"src/**/*.{js,jsx}"
],
"concurrency": 5,
"require": [
"babel-core/register",
"babel-polyfill",
"ignore-styles",
"./test/setup.js"
],
"babel": "inherit"
}
```execute `npm run test`. Test runs successfully without error.