Comparing version 1.5.3 to 1.5.4
@@ -321,2 +321,3 @@ var colors = require('colors'), | ||
fn.testName = name; | ||
fn.line = undefined; | ||
return fn; | ||
@@ -323,0 +324,0 @@ }); |
{ | ||
"name":"highkick", | ||
"version":"1.5.3", | ||
"version":"1.5.4", | ||
"description":"Asynchronous, no-style, super simple testing tool.", | ||
@@ -5,0 +5,0 @@ "author":"Azer Koculu <azer@kodfabrik.com>", |
@@ -11,2 +11,60 @@ HighKick is a no-style, light-weight and powerful testing tool for NodeJS. | ||
# Overview | ||
CoffeeScript: | ||
```coffeescript | ||
init = (options, callback) -> | ||
startWebServer callback | ||
testFoo = (callback) -> | ||
get "http://localhost/api/foo", (error, response) -> | ||
if error | ||
callback error | ||
return | ||
assert.equal response.foo 'foo' | ||
callback() | ||
end = (callback) -> | ||
stopWebServer callback | ||
module.exports = | ||
init: init | ||
testFoo: testFoo | ||
end: end | ||
``` | ||
JavaScript: | ||
```javascript | ||
function init(options, callback){ | ||
startWebServer(callback); | ||
} | ||
function testFoo(callback){ | ||
get('http://localhost/api/foo', function(error, response){ | ||
if(error){ | ||
callback(error); | ||
return; | ||
} | ||
assert.equal(response.foo, 'foo') | ||
callback(); | ||
}); | ||
} | ||
function end(callback){ | ||
stopWebServer(callback); | ||
} | ||
module.exports = { | ||
'init': init, | ||
'testFoo': testFoo, | ||
'end': end | ||
}; | ||
``` | ||
# First Steps | ||
@@ -13,0 +71,0 @@ |
var assert = require('assert'); | ||
function init(options, callback){ | ||
// what init's callback returns is passed to the tests as seen below example | ||
callback(null, options); | ||
@@ -6,0 +5,0 @@ } |
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
18668
246