Browse Source

* Fancy messages

* show summury message
refactor
Harish.K 10 years ago
parent
commit
0eec146cef
  1. 8
      index-v1.js
  2. 5
      main-runner.js

8
index-v1.js

@ -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 ){

5
main-runner.js

@ -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 );
}
});
}

Loading…
Cancel
Save