-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Document how to use babel-polyfill to polyfill the test environment #727
Comments
Isn't it just about having this in the
|
@novemberborn: following Sindre's call to the weapons - i'd like to take this issue if it is still relevant and nobody else is working on it! |
@florianb that's awesome, go for it! |
@novemberborn - it seems like this issue is invalid, since However, i might be wrong or i also could still add an ES2015-section to the docs. I'd appreciate any hint. 😄 |
ES2017 includes ES2015 😉 https://github.com/avajs/ava/blob/master/docs/recipes/babelrc.md has further details beyond what is in the main README. The issue is that we can only transpile syntax, we don't modify built-ins. It's documented in https://github.com/avajs/babel-preset-stage-4, which is linked to, but we could spell it out better in at least the This is why we should still document |
Aye - i then will add a proposal for the babelrc. Thanks for clarification. |
@novemberborn: Change drafted, i would appreciate any feedback and since this is my first contribution i guess there is room for improvement. Thank you very much in advance. |
AVA does not load polyfills when running tests. This means features like
['foo', 'bar'].includes('foo')
are not available. We should update the ES2015 docs to point this out, and add a recipe explaining how to usebabel-polyfill
with AVA.There should be a caveat to the latter that users shouldn't load
babel-polyfill
unless they also use it in their applications, since the polyfill will apply to both test and source files.See #263 for background.
The text was updated successfully, but these errors were encountered: