ferlores / mochify-istanbul

Instrument + create reports using istanbul with the mochify stream
Other
20 stars 11 forks source link

Apply instrumentation in the Browserify pipeline instead of a transform #21

Closed mantoni closed 8 years ago

mantoni commented 8 years ago

This refactoring allow other transforms to modify the source code before instrumentation happens, e.g. the babelify transform.

Fixes https://github.com/mantoni/mochify.js/issues/116

I have tested this with babelify@^7.2.0 and the transform being configured in the package.json like this:

"browserify": {
  "transform": ["babelify"]
}

All the tests still pass without modification.

tomastrajan commented 8 years ago

+1

ferlores commented 8 years ago

I like it. Thanks for the contribution. Could you please also add a test for the babelify case? Thanks!

mantoni commented 8 years ago

I've added test cases for the babelify case and also for the node_modules case. I'm now recording the files to instrument in a transform. This should make sure that we leave the include / exclude logic unaltered. It works great for me, please verify on your end.

mantoni commented 8 years ago

And after a slight timeout adjustment, Travis is also happy.

ferlores commented 8 years ago

@mantoni Thanks for the contribution man. I'm adding you as a contributor

ferlores commented 8 years ago

I meant as a collaborator

mantoni commented 8 years ago

Thanks!

mantoni commented 8 years ago

@ferlores Can you publish this as 2.4.0 on npm?

ferlores commented 8 years ago

Published as 2.4.0. Thanks!