We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6981b3 commit 60c869fCopy full SHA for 60c869f
1 file changed
lib/coverage.js
@@ -54,7 +54,9 @@ exports.instrument = function(options) {
54
var matcher, instrumenter;
55
56
matcher = function (file) {
57
- return file === options.code.path;
+ if (typeof options.coverage === 'string') return file.indexOf(options.coverage) === 0;
58
+ else if (options.coverage instanceof RegExp) return options.coverage.test(file);
59
+ else return file === options.code.path;
60
}
61
instrumenter = new istanbul.Instrumenter();
62
istanbul.hook.hookRequire(matcher, instrumenter.instrumentSync.bind(instrumenter));
0 commit comments