Comparing version 1.5.1 to 1.5.2
@@ -77,3 +77,3 @@ var colors = require('colors'), | ||
function filterTestFunctions(el){ | ||
return el.substring(0,4) == 'test' && ( !process.env.KICK || isEnabled(el, process.env.KICK) ); | ||
return el.substring(0,4) == 'test'; | ||
} | ||
@@ -303,3 +303,3 @@ | ||
testsuite.title = options.name && !options.main ? format(options.name, 'bold') + format(' | ', 'grey') : ''; | ||
testsuite.title = options.name ? format(options.name, 'bold') + format(' | ', 'grey') : ''; | ||
@@ -314,3 +314,9 @@ testsuite.printTestResult = genPrintTestResult(testsuite); | ||
testsuite.tests = Object.keys(options.module).filter(filterTestFunctions).map(function(name){ | ||
testsuite.tests = Object.keys(options.module).filter(filterTestFunctions); | ||
testsuite.options.main && ( testsuite.tests = testsuite.tests.filter(function(el){ | ||
return ( !process.env.KICK || isEnabled(el, process.env.KICK) ); | ||
}) ); | ||
testsuite.tests = testsuite.tests.map(function(name){ | ||
var fn = options.module[name]; | ||
@@ -317,0 +323,0 @@ fn.testName = name; |
{ | ||
"name":"highkick", | ||
"version":"1.5.1", | ||
"version":"1.5.2", | ||
"description":"Asynchronous, no-style, super simple testing tool.", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
HighKick is a no-style, light-weight and powerful testing tool for NodeJS. | ||
![Screenshot](https://github.com/downloads/azer/highkick/highkick.png) | ||
![Screenshot](https://github.com/downloads/azer/highkick/highkick1.5.png) | ||
@@ -34,6 +34,4 @@ # Installation | ||
## Running Tests | ||
Below command will run the all tests defined in tests.js; | ||
To run the tests on command-line; | ||
```bash | ||
@@ -43,3 +41,3 @@ $ highkick tests.js | ||
HighKick lets us filter the tests that we want to run; | ||
To specify the tests that needs to run; | ||
@@ -50,3 +48,3 @@ ```bash | ||
The command above will only run testFoo. Use comma for separating multiple test names, and '*' for running all tests. | ||
se comma for separating multiple test names, and '*' for running all tests. | ||
@@ -88,10 +86,10 @@ ## Init | ||
exports.init = function(options, callback){ | ||
callback(undefined, +(new Date)); | ||
callback(undefined, 'hello'); | ||
} | ||
exports.beforeEach = function(testStartTime, callback){ | ||
callback(undefined, +(new Date)); | ||
exports.beforeEach = function(hello, callback){ | ||
callback(undefined, 'world'; | ||
} | ||
exports.testFoo = function(testStartTime, now, callback){ | ||
exports.testFoo = function(hello, world, callback){ | ||
... | ||
@@ -98,0 +96,0 @@ } |
Sorry, the diff of this file is not supported yet
17760
422
188