Reputation: 142
I really like code-coverage reports for my code in node.js. I've already created a node.js module that can inject instrumented code (and mock our require statements) called requiremock
I'm using that in my other module nodecoverage together with the binary version of jsCoverage (windows) to generate code coverage reports, injecting instrumented versions of code with requiremock.
The problems with using jsCoverage are
So my question is:
What JavaScript parser written in JavaScript should I choose to reimplement jsCoverage as a node.js module?
I have to be able to know the linenumber of the code in the original file, and also know what whitespacing was like.
Upvotes: 2
Views: 635
Reputation: 25466
Try esprima. It's awesome. Also node-cover potentially already does have what you need
Upvotes: 2