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

Importing ES2015 package doesn't work #608

Closed
adius opened this issue Mar 6, 2016 · 4 comments
Closed

Importing ES2015 package doesn't work #608

adius opened this issue Mar 6, 2016 · 4 comments

Comments

@adius
Copy link

adius commented Mar 6, 2016

Description

Clone the repo at https://gist.github.com/adius/1f2167b01db05f4d09c9 and run npm test. I get the error message in error.txt, but this should work, shouldn't it?

Environment

Node.js v5.7.0
darwin 15.3.0

@sindresorhus
Copy link
Member

AVA currently only transpiles the tests you ask it to run. It will not transpile modules you import from outside of the test. - https://github.com/sindresorhus/ava#transpiling-imported-modules

This will be possible in the next version as soon as #573 lands ;)

@adius
Copy link
Author

adius commented Mar 6, 2016

Oh, sorry. I forgot to update the repo.
I meant the version with require 'babel-register, which is not working either.
Please check out the repo again!

@sindresorhus sindresorhus reopened this Mar 6, 2016
@chenghaoc
Copy link

I just encountered the similar problem and turned out that I forgot the .babelrc file.
Maybe helpful to you.

@jamestalmage
Copy link
Contributor

I just checked the repo, adding an appropriate .babelrc should fix your issue.

Ping back if it doesn't.

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

4 participants