From 4f12c7b4414f9e3aa2bcf6a2d98f597326ca4382 Mon Sep 17 00:00:00 2001 From: Nick Malaguti Date: Tue, 14 Apr 2015 10:44:17 -0400 Subject: [PATCH] fix: Can specify only some watermarks Merges in specified watermarks with the Istanbul defaults. Closes #144 --- lib/reporter.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/reporter.js b/lib/reporter.js index d8e488e..8768280 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -42,6 +42,10 @@ var CoverageReporter = function(rootConfig, helper, logger) { var sourceCache = globalSourceCache.getByBasePath(basePath); var includeAllSources = config.includeAllSources === true; + if (config.watermarks) { + config.watermarks = helper.merge({}, istanbul.config.defaultConfig().reporting.watermarks, config.watermarks); + } + if (!helper.isDefined(reporters)) { reporters = [config]; }