Browse Source

Fixes:

refactor
Harish.K 10 years ago
parent
commit
e0a988709f
  1. 10
      index.js
  2. 2
      package.json

10
index.js

@ -13,7 +13,7 @@
/* Don't do anything if we are in Mocha's environment */
if( global.describe ){ return; }
// if( global.describe ){ return; }
@ -23,6 +23,13 @@ function padding( str, width ){
return ( ' ' + str ).slice(-width);
}
var printer = function(prefix){
return function(){
var args = [].slice.call(arguments);
args[0] = prefix + args[0];
console.log.apply(console, args );
};
};
function Task(name, fn, parentNode ){
@ -72,6 +79,7 @@ Task.prototype.print = function(){
function runner( d, cb ){
cb = cb||function(){};
var print = printer( d.indent );
console.log('');
print( 'Describe: ', d.name );

2
package.json

@ -1,6 +1,6 @@
{
"name": "simple-mocha",
"version": "0.0.2",
"version": "0.0.3",
"description": "Simple stupid implementation of Mocha test runner. Tests can be run directly within node as any Nodejs code.",
"author": "Harish.K<harish2704@gmail.com>",
"license": "MIT",

Loading…
Cancel
Save