grunt-template-jasmine-istanbul_src-main-js-template.js
function (collector, options) {
	var summaries = [];
	var thresholds = options.thresholds;

	var files = collector.files();
	files.forEach(function(file) {
		summaries.push(istanbul.utils.summarizeFileCoverage(
				collector.fileCoverageFor(file)));
	});

	var finalSummary = istanbul.utils.mergeSummaryObjects.apply(null,
			summaries);

	grunt.util._.each(thresholds, function (threshold, metric) {
		var actual = finalSummary[metric];
		if(!actual) {
			grunt.warn('unrecognized metric: ' + metric);
		}
		if(actual.pct < threshold) {
			grunt.warn('expected ' + metric + ' coverage to be at least '
					+ threshold + '% but was ' + actual.pct + '%');
		}
	});
}
function (collector, options) {
	var summaries = [];
	var thresholds = options.thresholds;

	var files = collector.files();
	files.forEach(function(file) {
		summaries.push(istanbul.utils.summarizeFileCoverage(
				collector.fileCoverageFor(file)));
	});

	var finalSummary = istanbul.utils.mergeSummaryObjects.apply(null,
			summaries);

	grunt.util._.each(thresholds, function (threshold, metric) {
		var actual = finalSummary[metric];
		if(!actual) {
			grunt.warn('unrecognized metric: ' + metric);
		}
		if(actual.pct < threshold) {
			grunt.warn('expected ' + metric + ' coverage to be at least '
					+ threshold + '% but was ' + actual.pct + '%');
		}
	});
}
function ( collector , options ) { var summaries = [ ] ; var thresholds = options . thresholds ; var files = collector . files ( ) ; files . forEach ( function ( file ) { summaries . push ( istanbul . utils . summarizeFileCoverage ( collector . fileCoverageFor ( file ) ) ) ; } ) ; var finalSummary = istanbul . utils . mergeSummaryObjects . apply ( null , summaries ) ; grunt . util . _ . each ( thresholds , function ( threshold , metric ) { var actual = finalSummary [ metric ] ; if ( ! actual ) { grunt . warn ( 'unrecognized metric: ' + metric ) ; } if ( actual . pct < threshold ) { grunt . warn ( 'expected ' + metric + ' coverage to be at least ' + threshold + '% but was ' + actual . pct + '%' ) ; } } ) ; }
Checks whether the specified threshold options have been met. Issues a
warning if not.

@param {Collector} collector The collector containing the coverage
@param {Object} options The options describing the thresholds
Checks whether the specified threshold options have been met . Issues a warning if not .