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

Babelify only test files #50

Closed
vadimdemedes opened this issue Sep 11, 2015 · 1 comment
Closed

Babelify only test files #50

vadimdemedes opened this issue Sep 11, 2015 · 1 comment

Comments

@vadimdemedes
Copy link
Contributor

I think we should apply babel only to test files, e.g test.js, test/test-something.js.
Currently, if you have this common code:

const test = require('ava');

const mylib = require('./');

mylib will also be run through babel and that is not good, because that way AVA transforms library's source code. This behavior could be fixed by setting a regex for require('babel/register') to whitelist only test files.

@sindresorhus
Copy link
Member

👍 We already know which files are the test files, so we can just blacklist anything that is not passed into AVA.

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

2 participants