Comparing version 1.3.1 to 1.3.2
@@ -9,3 +9,3 @@ var _puts = require('sys').puts, | ||
var tests = Object.keys(module) | ||
.filter(function(el){ return el.substring(0,5)=='test_' }) | ||
.filter(function(el){ return el.substring(0,4)=='test' }) | ||
.map(function(el){ return module[el] }); | ||
@@ -24,3 +24,3 @@ | ||
process.stdout.write(error ? 'FAIL '.bold.red : 'OK '.green.bold); | ||
_puts(test.name.bold.yellow + ' ('.grey+(ctr+'/'+len).bold+', '.grey + (( (new Date).getTime() - test.startTS)/1000+'s').white.bold+') '.grey) | ||
_puts(test.name.bold.yellow + ' ('.grey+(ctr+'/'+len).bold+', '.grey + (( (new Date).getTime() - test.startTS)/1000+'s').white.bold+') '.grey); | ||
if(error){ | ||
@@ -27,0 +27,0 @@ _puts('ERROR: '.bold.red+(error.message ? error.message.bold : '')+'\n'+error.stack+')'); |
{ | ||
"name":"highkick", | ||
"version":"1.3.1", | ||
"version":"1.3.2", | ||
"description":"Asynchronous, no-style, super simple testing tool.", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
@@ -23,3 +23,3 @@ Asynchronous, no-style, super simple testing tool for NodeJS. | ||
============ | ||
Code your tests in a separated module; | ||
Code your tests in a separated module, naming them starting with "test": | ||
@@ -32,3 +32,3 @@ ```javascript | ||
exports.test_foo = function(callback){ | ||
exports.testFoo = function(callback){ | ||
setTimeout(function(){ | ||
@@ -46,3 +46,3 @@ try { | ||
exports.test_bar = function(callback){ | ||
exports.testBar = function(callback){ | ||
callback(); | ||
@@ -53,3 +53,2 @@ } | ||
You can optionally add an *init function* that will be called before each test. | ||
@@ -67,3 +66,3 @@ | ||
exports.test_corge = function test_corge(date, randomNumber, callback){ | ||
exports.testCorge = function(date, randomNumber, callback){ | ||
callback(); | ||
@@ -74,3 +73,2 @@ } | ||
You may be curious about the ```options``` variable passed to the init function (if you've defined one). | ||
@@ -77,0 +75,0 @@ You pass the ```options``` object to the highkick function itself, to run the tests. |
@@ -10,3 +10,3 @@ var assert = require('assert'), | ||
function test_async_1(pi, callback){ | ||
function testAsync1(pi, callback){ | ||
assert.equal(++counter, 1); | ||
@@ -20,3 +20,3 @@ assert.equal(pi, 3.14); | ||
function test_async_2(pi, callback){ | ||
function testAsync2(pi, callback){ | ||
assert.equal(++counter, 2); | ||
@@ -30,3 +30,3 @@ assert.equal(pi, 3.14); | ||
function test_sync(pi, callback){ | ||
function testSync(pi, callback){ | ||
assert.equal(++counter, 3); | ||
@@ -37,3 +37,3 @@ assert.equal(pi, 3.14); | ||
function test_nested(test, callback){ | ||
function testNested(test, callback){ | ||
assert.equal(++counter, 4); | ||
@@ -47,3 +47,3 @@ highkick({ module:require('./test_nested'), 'silent':false, 'name':'nested', foo:true },function(error,result){ | ||
function test_ordered(test, callback){ | ||
function testOrdered(test, callback){ | ||
assert.equal(++counter, 5); | ||
@@ -59,7 +59,7 @@ highkick({ module:require('./test_ordered'), 'ordered':true, 'name':'ordered' },function(error,result){ | ||
'init':init, | ||
'test_async_1':test_async_1, | ||
'test_async_2':test_async_2, | ||
'test_sync':test_sync, | ||
'test_nested':test_nested, | ||
'test_ordered':test_ordered | ||
'testAsync1':testAsync1, | ||
'testAsync2':testAsync2, | ||
'testSync':testSync, | ||
'testNested':testNested, | ||
'testOrdered':testOrdered | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9037
109