jeffrifwald/babel-istanbul

Any example of this module working?

dasilvacontin opened this issue · 1 comments

I had to fork it to add 'babel-core' as a dependency, and it still didn't work, maybe because the correct register hook wasn't used. Any example of a package using this module?

I don't have any open source examples available. There are several places in which you can be running into trouble. First off, adding babel-core to this package won't do much for you. That dependency should be in the package you are testing only if you need it.

The biggest problem people face is how babel-register and istanbul do not play nice together. It boils down to not using babel in ways that mess with istanbul's instrumentation. Those methods that cause trouble include requiring babel-regsiter or using a compiler flag in your test runner as in mocha --compiler:babel.

Basically, use babel-node instead of node to run your tests. Using babel-node is the only way I know of babel 6+ and istanbul working together.