Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watermarks are not passed to reporters #143

Closed
nmalaguti opened this issue Apr 14, 2015 · 0 comments · Fixed by #145 · 4 remaining pull requests
Closed

Watermarks are not passed to reporters #143

nmalaguti opened this issue Apr 14, 2015 · 0 comments · Fixed by #145 · 4 remaining pull requests

Comments

@nmalaguti
Copy link
Contributor

Watermarks are not currently passed in the options to each reporter.

Config:

coverageReporter: {
  watermarks: {
    statements: [ 50, 75 ],
    functions: [ 50, 75 ],
    branches: [ 50, 75 ],
    lines: [ 50, 75 ]
  }
}

watermarks, which is defined on config, is not merged into options before being passed into istanbul.Report.create.

var config = rootConfig.coverageReporter || {};
// omitted
this.onRunComplete = function(browsers) {
  reporters.forEach(function(reporterConfig) {
// omitted
    var options = helper.merge({}, reporterConfig, {
      dir : outputDir,
      sourceStore : new SourceCacheStore({
        sourceCache: sourceCache
      })
    });
    var reporter = istanbul.Report.create(reporterConfig.type || 'html', options);
// omitted
  });
};
nmalaguti added a commit to nmalaguti/karma-coverage that referenced this issue Apr 14, 2015
Merges the coverageReporter config with the options passed to
each reporter.

Closes karma-runner#143
nmalaguti added a commit to nmalaguti/karma-coverage that referenced this issue Jun 1, 2015
Merges the coverageReporter config with the options passed to
each reporter.

Merges in specified watermarks with the Istanbul defaults.

Added tests for watermarks

Closes karma-runner#143, karma-runner#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment