-
-
Save kinsteronline/1403399 to your computer and use it in GitHub Desktop.
Using coffeescript vowsjs for Async tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows = require 'vows' | |
assert = require 'assert' | |
cb = (callback) -> | |
setTimeout -> | |
callback(null, 'callback') | |
, 2000 | |
andWaitForCallback = undefined | |
vows | |
.describe('Callback Example') | |
.addBatch | |
'base:': | |
topic: -> | |
cb @callback | |
andWaitForCallback | |
"should be callback": (err, result) -> | |
assert.equal result, 'callback' | |
.export module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment