Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel for helper files #738

Closed
calebmer opened this issue Apr 7, 2016 · 2 comments
Closed

Babel for helper files #738

calebmer opened this issue Apr 7, 2016 · 2 comments

Comments

@calebmer
Copy link

calebmer commented Apr 7, 2016

Currently ava does not use babel with helper files, is there a way to change this functionality? I have a file named helpers/index.js which I import from my ES6 tests which ava automatically compiles with Babel. When I try using import … from … syntax in my helper files it fails.

Is it possible for ava to run helper files using Babel either now or in the future?

Environment

ava 0.13.0
Node.js 5.0.0
darwin 15.2.0
@jamestalmage
Copy link
Contributor

Not without using babel-register. This is definitely on the list of future enhancements though.

If you really need it now check out the Babel config recipes in the docs, and use --require babel-register

@novemberborn
Copy link
Member

This is definitely on the list of future enhancements though.

See #720.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants