coverage.js
function reportCoverage(cov) {
    // Stats
    print('\n   [bold]{Test Coverage}\n');
    var sep = '   +------------------------------------------+----------+------+------+--------+',
        lastSep = '                                              +----------+------+------+--------+';
	result = sep+'\n';
    result += '   | filename                                 | coverage | LOC  | SLOC | missed |\n';
    result += sep+'\n';
    for (var name in cov) {
        var file = cov[name];
        if (Array.isArray(file)) {
            result += '   | ' + rpad(name, 40);
            result += ' | ' + lpad(file.coverage.toFixed(2), 8);
            result += ' | ' + lpad(file.LOC, 4);
            result += ' | ' + lpad(file.SLOC, 4);
            result += ' | ' + lpad(file.totalMisses, 6);
            result += ' |\n';
        }
    }
    result += sep+'\n';
    result += '     ' + rpad('', 40);
    result += ' | ' + lpad(cov.coverage.toFixed(2), 8);
    result += ' | ' + lpad(cov.LOC, 4);
    result += ' | ' + lpad(cov.SLOC, 4);
    result += ' | ' + lpad(cov.totalMisses, 6);
    result += ' |\n';
    result += lastSep;
	console.log(result);

	for (var name in cov) {
		if (name.match(file_matcher)) {
			var file = cov[name];
			var annotated = '';
			annotated += colorize('\n  [bold]{' + name + '}:');
			annotated += colorize(file.source);
			annotated += '\n';
			fs.writeFileSync('annotated/'+name, annotated);
		}
	}
}
function reportCoverage(cov) {
    // Stats
    print('\n   [bold]{Test Coverage}\n');
    var sep = '   +------------------------------------------+----------+------+------+--------+',
        lastSep = '                                              +----------+------+------+--------+';
	result = sep+'\n';
    result += '   | filename                                 | coverage | LOC  | SLOC | missed |\n';
    result += sep+'\n';
    for (var name in cov) {
        var file = cov[name];
        if (Array.isArray(file)) {
            result += '   | ' + rpad(name, 40);
            result += ' | ' + lpad(file.coverage.toFixed(2), 8);
            result += ' | ' + lpad(file.LOC, 4);
            result += ' | ' + lpad(file.SLOC, 4);
            result += ' | ' + lpad(file.totalMisses, 6);
            result += ' |\n';
        }
    }
    result += sep+'\n';
    result += '     ' + rpad('', 40);
    result += ' | ' + lpad(cov.coverage.toFixed(2), 8);
    result += ' | ' + lpad(cov.LOC, 4);
    result += ' | ' + lpad(cov.SLOC, 4);
    result += ' | ' + lpad(cov.totalMisses, 6);
    result += ' |\n';
    result += lastSep;
	console.log(result);

	for (var name in cov) {
		if (name.match(file_matcher)) {
			var file = cov[name];
			var annotated = '';
			annotated += colorize('\n  [bold]{' + name + '}:');
			annotated += colorize(file.source);
			annotated += '\n';
			fs.writeFileSync('annotated/'+name, annotated);
		}
	}
}
function reportCoverage ( cov ) { // Stats print ( '\n   [bold]{Test Coverage}\n' ) ; var sep = '   +------------------------------------------+----------+------+------+--------+' , lastSep = '                                              +----------+------+------+--------+' ; result = sep + '\n' ; result += '   | filename                                 | coverage | LOC  | SLOC | missed |\n' ; result += sep + '\n' ; for ( var name in cov ) { var file = cov [ name ] ; if ( Array . isArray ( file ) ) { result += '   | ' + rpad ( name , 40 ) ; result += ' | ' + lpad ( file . coverage . toFixed ( 2 ) , 8 ) ; result += ' | ' + lpad ( file . LOC , 4 ) ; result += ' | ' + lpad ( file . SLOC , 4 ) ; result += ' | ' + lpad ( file . totalMisses , 6 ) ; result += ' |\n' ; } } result += sep + '\n' ; result += '     ' + rpad ( '' , 40 ) ; result += ' | ' + lpad ( cov . coverage . toFixed ( 2 ) , 8 ) ; result += ' | ' + lpad ( cov . LOC , 4 ) ; result += ' | ' + lpad ( cov . SLOC , 4 ) ; result += ' | ' + lpad ( cov . totalMisses , 6 ) ; result += ' |\n' ; result += lastSep ; console . log ( result ) ; for ( var name in cov ) { if ( name . match ( file_matcher ) ) { var file = cov [ name ] ; var annotated = '' ; annotated += colorize ( '\n  [bold]{' + name + '}:' ) ; annotated += colorize ( file . source ) ; annotated += '\n' ; fs . writeFileSync ( 'annotated/' + name , annotated ) ; } } }
Report test coverage.

@param  {Object} cov
Report test coverage .