devongovett / browserify-istanbul

A browserify transform for the istanbul code coverage tool
50 stars 32 forks source link

Support latest (unstable) istanbul@1.0.0-alpha.2 #38

Open tbranyen opened 8 years ago

tbranyen commented 8 years ago

I've been trying to get browserify-istanbul to work with the latest unstable Istanbul version for more accurate ES6 coverage reports.

Currently stuck on the fact that neither esprima@3.0.0-beta or the version specified in istanbul-instrumenter package seem to support ES6 module syntax. This is bizarre to me, but when running against my codebase I get:

14 05 2016 14:47:00.671:ERROR [karma]: { [Error: Line 6: Unexpected token] index: 122, lineNumber: 6, description: 'Unexpected token' }
Error: Line 6: Unexpected token

Which correlates to:

export class TransitionStateError extends Error {

So unless we can figure out why this isn't parsing to a correct AST, I'm blocked on further progress :-/

alexindigo commented 8 years ago

I don't have much experience with ES6 yet, so I won't be of much help with unstable istanbul. But what you're describing seems like problem with istanbul itself rather than with this project.

tbranyen commented 8 years ago

How do you figure? This library is tightly coupled to the API provided by Istanbul or similar instrumenters. If Istanbul changes their API surface area, it would totally be related to this tightly coupled library.