From c4f7a9c5542d7830cd254a5eeb21af947969f5a1 Mon Sep 17 00:00:00 2001 From: Brian Di Palma Date: Wed, 24 Jul 2019 16:24:53 +0100 Subject: [PATCH] feat(config): support istanbul-api instrumentation configuration Closes #73 --- README.md | 8 +++++++- src/reporter.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fc0bf39..4de6df1 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,13 @@ module.exports = function(config) { } }, - verbose: true // output config used by istanbul for debugging + verbose: true, // output config used by istanbul for debugging + + // `instrumentation` is used to configure Istanbul API package. + instrumentation: { + // To include `node_modules` code in the report. + 'default-excludes': false + } } }); }; diff --git a/src/reporter.js b/src/reporter.js index 7645a6b..5b77c28 100644 --- a/src/reporter.js +++ b/src/reporter.js @@ -82,6 +82,7 @@ function CoverageIstanbulReporter(baseReporterDecorator, logger, config) { : {}; const reportConfig = istanbul.config.loadObject({ + instrumentation: Object.assign({}, coverageConfig.instrumentation), verbose: coverageConfig.verbose === true, reporting: Object.assign({}, coverageConfig, reportConfigOverride) });