mirror of
https://github.com/harish2704/simple-mocha.git
synced 2026-09-10 06:21:08 +00:00
Fixes:
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Don't do anything if we are in Mocha's environment */
|
/* 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);
|
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 ){
|
function Task(name, fn, parentNode ){
|
||||||
@@ -72,6 +79,7 @@ Task.prototype.print = function(){
|
|||||||
|
|
||||||
function runner( d, cb ){
|
function runner( d, cb ){
|
||||||
cb = cb||function(){};
|
cb = cb||function(){};
|
||||||
|
var print = printer( d.indent );
|
||||||
console.log('');
|
console.log('');
|
||||||
print( 'Describe: ', d.name );
|
print( 'Describe: ', d.name );
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "simple-mocha",
|
"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.",
|
"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>",
|
"author": "Harish.K<harish2704@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
Reference in New Issue
Block a user