devongovett / browserify-istanbul

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

Ignore patterns configuration options #5

Closed ebednarz closed 10 years ago

ebednarz commented 10 years ago

I was very excited about this module because I need to get karma coverage working in a browserify project; as I understand it, options can only be supplied when the module API is used (i.e. there is no package.json configuration like in i.e. browserify-shim)? The default ignore patterns only match directory based test setups; when the tests are in the same directory as the implementations, I see no way to hook this into the karma configuration.

This could be easily fixed by adding something like '*_/__test.js' to the default patterns. Cf. https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub#h.j5rabwh55y7k

devongovett commented 10 years ago

You can provide configuration in your package.json as part of the transform key. See https://github.com/devongovett/browserify-istanbul/pull/1.

ebednarz commented 10 years ago

Thanks. It would be nice if this was mentioned in the README.