-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Recipe for testing ES6 modules #447
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
Comments
It's kind of covered by the code coverage recipe, but it might be good to have a simpler recipe that didn't include that. Some stuff from this comment would apply here as well. |
See https://github.com/jamestalmage/__ava-0.8-with-babel-6 for a working example Repository name is a misnomer now - it uses [email protected]. |
It would also be great to have a recipe of how to use ava with rollup. |
@boutros What do you mean? Rollup is a module bundler—surely you aren't bundling AVA for production right? |
No, not for production of course. Anyway I solved it with rollup, so my remark can be ignored. If anyone is interested here is the relevant commit: boutros/koblersken@c00e3a0 It's easy to get lost in the javascript build jungle :) |
I think we're kinda already covering this. Of course if you use new language features that are supported by your targeted Node.js version you don't need to do anything special. If you need to transpile your source code we've covered that in the Transpiling imported modules section. I'm closing this issue, but if you have ideas on how to improve the documentation please open a new issue or PR! |
TL;DR: If you're using Rollup and no babel in your workflow, building a cjs bundle and requiring it in your tests works fine. Details: Here's an article on the "modern workflow" idea where Rollup is used to convert a bleeding edge project into any format you'd like: |
No description provided.
The text was updated successfully, but these errors were encountered: