added 'none' as valid display option
This commit is contained in:
parent
166057a0a3
commit
12a07d2ff4
@ -24,10 +24,15 @@ module.exports = function(grunt) {
|
|||||||
var junitTemplate = __dirname + '/jasmine/templates/JUnit.tmpl';
|
var junitTemplate = __dirname + '/jasmine/templates/JUnit.tmpl';
|
||||||
|
|
||||||
var status = {};
|
var status = {};
|
||||||
|
|
||||||
var summary = [];
|
var summary = [];
|
||||||
|
|
||||||
var symbols = {
|
var symbols = {
|
||||||
|
none : {
|
||||||
|
check : '',
|
||||||
|
error : '',
|
||||||
|
splat : ''
|
||||||
|
},
|
||||||
short : {
|
short : {
|
||||||
check : '.',
|
check : '.',
|
||||||
error : 'X',
|
error : 'X',
|
||||||
@ -44,6 +49,11 @@ module.exports = function(grunt) {
|
|||||||
//https://github.com/visionmedia/mocha/pull/641
|
//https://github.com/visionmedia/mocha/pull/641
|
||||||
if (process && process.platform === 'win32') {
|
if (process && process.platform === 'win32') {
|
||||||
symbols = {
|
symbols = {
|
||||||
|
none : {
|
||||||
|
check : '',
|
||||||
|
error : '',
|
||||||
|
splat : ''
|
||||||
|
},
|
||||||
short : {
|
short : {
|
||||||
check : '.',
|
check : '.',
|
||||||
error : '\u00D7',
|
error : '\u00D7',
|
||||||
@ -296,14 +306,18 @@ module.exports = function(grunt) {
|
|||||||
// If we haven't written out since we've started
|
// If we haven't written out since we've started
|
||||||
if (thisRun.cleanConsole) {
|
if (thisRun.cleanConsole) {
|
||||||
// then append to the current line.
|
// then append to the current line.
|
||||||
grunt.log.writeln('...' + symbols[options.display][symbol]);
|
if (options.display !== 'none') {
|
||||||
|
grunt.log.writeln('...' + symbols[options.display][symbol]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Otherwise reprint the current spec and status.
|
// Otherwise reprint the current spec and status.
|
||||||
grunt.log.writeln(
|
if (options.display !== 'none') {
|
||||||
indent(indentLevel) + '...' +
|
grunt.log.writeln(
|
||||||
chalk.grey(specMetaData.description) + '...' +
|
indent(indentLevel) + '...' +
|
||||||
symbols[options.display][symbol]
|
chalk.grey(specMetaData.description) + '...' +
|
||||||
);
|
symbols[options.display][symbol]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +343,7 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
log('No specs executed, is there a configuration error?');
|
log('No specs executed, is there a configuration error?');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(options.display === 'short') {
|
if(options.display === 'short') {
|
||||||
grunt.log.writeln();
|
grunt.log.writeln();
|
||||||
}
|
}
|
||||||
@ -345,7 +359,7 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
grunt.log.writeln('\n' + specQuantity + 'in ' + (dur / 1000) + "s.");
|
grunt.log.writeln('\n' + specQuantity + 'in ' + (dur / 1000) + "s.");
|
||||||
});
|
});
|
||||||
|
|
||||||
function logSummary(tests) {
|
function logSummary(tests) {
|
||||||
grunt.log.writeln('Summary (' + tests.length + ' tests failed)');
|
grunt.log.writeln('Summary (' + tests.length + ' tests failed)');
|
||||||
_.forEach(tests, function(test){
|
_.forEach(tests, function(test){
|
||||||
|
Loading…
Reference in New Issue
Block a user