Allow the developer to opt out of instrumentation - enable browserify + buster + istanbul #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @kates,
Firstly thanks for an amazing library. You can see how far I got implementing my own before I realised your's did almost everything I wanted, better.
Basically the background of this is for our projects we use browserify and buster.js.
The way @gotwarlost, author of Istanbul, suggests to use browserify with istanbul is to first instrument the individual javascript modules, then compile, then run the unit tests. This works beautifully - until you want to plug that into buster.js..
I tried to implement this bit myself (with some success) but afterwards realised that actually I'd made something that did almost the same things as this library - so it would probably be better to try to merge the two together.
It turns out merging them only required one tiny change - adding the option for the developer to opt out of the way your library automatically instruments the javascript files so that the instrumenting and compiling happen in steps before running the buster tests (I used grunt to run the tasks and grunt-istanbul to instrument (just) the files that I was interested in).
(Also we want to be able to put other types of code in the
sources
section of our buster.js config without having those instrumented (eg mocks, sample data, etc). - For this reason I've added theinstrument: false
option for node as well as browsers)I've tried to keep my changes to a minimum and would be more than happy to tweak them to adhere to your preferred coding styles - just let me know what you would like to change.
Thanks again,
Matt