Closed thealjey closed 8 years ago
This should probably go in the transformer instead of here. There is too much that can go wrong in that call.
https://github.com/ambitioninc/babel-istanbul/blob/master/lib/instrumenter.js#L455
I'm not sure that this is the correct recourse either. I'll have to ponder this a little bit. This might just be an artifact of how you run your tests (creating multiple subprocesses).
I specifically remember babel failing before istanbul even gets ahold of things if you use babel-node
to run your tests. That should probably be the optimal course of action.
When Babel transformation fails for some reason and an exception is thrown - an empty
coverage
directory is created and no report is printed to the terminal (because Babel is called in the process exit handler). As a result Istanbul simply refuses to work without any indication of error. Kind of like is described here.