You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to move my unit tests from mocha to AVA, because AVA seems super cool, but I haven't been able to run any tests yet due to this strange problem:
When I run this command:
$ npm run test
Which invokes this line from my package.json file:
"scripts": {
"test": "ava"
}
the output I get is this:
Michaels-iMac:someapp michael$ npm run test
> [email protected] test /Users/michael/gitprojects/someapp
> ava
Uncaught Exception: /Users/michael/gitprojects/someapp/test/test.js
ReferenceError: [BABEL] /Users/michael/gitprojects/someapp/test/test.js: Unknown option: /Users/michael/gitprojects/someapp/.babelrc.presets
at Logger.error (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
at OptionManager.mergeOptions (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
at OptionManager.addConfig (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
at OptionManager.findConfigs (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
at OptionManager.init (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
at File.initOptions (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/index.js:147:75)
at new File (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/file/index.js:137:22)
at Pipeline.transform (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
at Object.transformFileSync (/Users/michael/gitprojects/someapp/node_modules/babel-core/lib/api/node.js:137:37)
Error: Test results were not received from: /Users/michael/gitprojects/someapp/test/test.js
at ChildProcess. (/Users/michael/gitprojects/someapp/node_modules/ava/lib/fork.js:51:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
From previous event:
at module.exports (/Users/michael/gitprojects/someapp/node_modules/ava/lib/fork.js:23:16)
at run (/Users/michael/gitprojects/someapp/node_modules/ava/cli.js:135:9)
at Array.map (native)
at /Users/michael/gitprojects/someapp/node_modules/ava/cli.js:216:25
From previous event:
at init (/Users/michael/gitprojects/someapp/node_modules/ava/cli.js:207:4)
at Object. (/Users/michael/gitprojects/someapp/node_modules/ava/cli.js:253:2)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:457:10)
at startup (node.js:136:18)
at node.js:972:3
And then the error says Error: Test results were not received from: /Users/.../someapp/test/test.js
If I run babel on its own, it works just fine. But when I run AVA, I get the Babel error above.
I know Babel has had some growing pains from 5.x to 6.x, but even after I have tried cleaning up my node_modules directory and cleaning the npm cache, I still get this error.
Hey there AVA Team!
I wanted to move my unit tests from mocha to AVA, because AVA seems super cool, but I haven't been able to run any tests yet due to this strange problem:
When I run this command:
$ npm run test
Which invokes this line from my
package.json
file:the output I get is this:
You can see I get this ReferenceError:
ReferenceError: [BABEL] ... Unknown option: .babelrc.presets
Even though I have a valid
.babelrc
file:And then the error says
Error: Test results were not received from: /Users/.../someapp/test/test.js
If I run babel on its own, it works just fine. But when I run AVA, I get the Babel error above.
I know Babel has had some growing pains from 5.x to 6.x, but even after I have tried cleaning up my
node_modules
directory and cleaning the npm cache, I still get this error.If it helps, here are my babel dependencies:
Any ideas? Is this happening because AVA is not ready for Babel 6.x, or am I overlooking something?
Thanks!
The text was updated successfully, but these errors were encountered: