Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

Testing code that uses es6 module imports #475

Open
gxxcastillo opened this issue Mar 22, 2016 · 5 comments
Open

Testing code that uses es6 module imports #475

gxxcastillo opened this issue Mar 22, 2016 · 5 comments

Comments

@gxxcastillo
Copy link

Is it possible to test code that is written using es6 module import statements?

For now, I'm generating a compiled version of my code under test, putting it all into one file, and testing that, however, it would be great if I could test the original code directly.

@dominykas
Copy link
Member

Is there anything that supports ES6 modules natively?

@gxxcastillo
Copy link
Author

Good question. I'm just used to using Buster for all my testing and ran across that obstacle while trying to test a library I was working on. Admittedly, I still haven't fully wrapped my head around the issue of testing es6 modules.

@dominykas
Copy link
Member

I find that I end up doing what you said - generating a bundle, sometimes even one for tests, and testing that regardless if I'm using ES6 or not, browserify or webpack, etc.

@green3g
Copy link

green3g commented May 27, 2016

Perhaps it would be worthwhile to look into StealJS. It imports and transpiles ES6 modules natively. There's a steal-qunit package that supports testing with qunit, perhaps there could be one built for busterjs.

@mroderick
Copy link
Contributor

Can this be closed?

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

No branches or pull requests

4 participants