mirror of
https://github.com/harish2704/simple-mocha.git
synced 2026-09-10 06:21:08 +00:00
* Fancy messages
* show summury message
This commit is contained in:
+4
-4
@@ -7,10 +7,10 @@ var async = require('async');
|
||||
|
||||
var pr = console.log;
|
||||
|
||||
var INDENT = ' ';
|
||||
var INDENT = ' ';
|
||||
var STATUS_FLAG = {
|
||||
true : 'Okey',
|
||||
false : 'Fail'
|
||||
true : '\u001b[32m\u001b[1m' + '✔' + '\u001b[22m\u001b[39m',
|
||||
false : '\u001b[31m\u001b[1m' + '✗' + '\u001b[22m\u001b[39m',
|
||||
};
|
||||
|
||||
function print( level, item ){
|
||||
@@ -125,7 +125,7 @@ DescribeBlock.prototype.run = function( cb ){
|
||||
|
||||
if( this.afterFn ){ tasks.push( this.afterFn ); }
|
||||
|
||||
pr( getIndent( this.level) + '---' + this.description + '---' );
|
||||
pr( getIndent( this.level) + ' ---' + this.description + '---' );
|
||||
this.startTime = Date.now();
|
||||
return async.waterfall( tasks, function( err ){
|
||||
|
||||
|
||||
+4
-1
@@ -9,7 +9,10 @@ var sm = new SimpleMocha();
|
||||
|
||||
sm.onLoad = function(){
|
||||
sm.rootDescribeBlock.run( function( err ){
|
||||
console.log( err ? 'Finished with error' : 'Finished Successfully', err );
|
||||
console.log( err ? 'Finished with error' : 'Finished Successfully' );
|
||||
if( err ){
|
||||
console.log( err.stack || err );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user