Skip to content

Instantly share code, notes, and snippets.

@luebken
Created December 31, 2010 13:21
Show Gist options
  • Save luebken/761002 to your computer and use it in GitHub Desktop.
Save luebken/761002 to your computer and use it in GitHub Desktop.
var helloWorld = function (callback) {
setTimeout(function() { callback("Hallo Welt") }, 100);
}
var vows = require('vows'),
assert = require('assert');
vows
.describe('Hello World')
.addBatch({
'when asking for hello world asyncly' : {
topic: function() {
helloWorld(this.callback)
},
'we get "hallo welt"': function (x1) { //<= add a 2nd param to make it work
assert.equal(x1, 'Hallo Welt');
}
}
})
.export(module);
@luebken
Copy link
Author

luebken commented Dec 31, 2010

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment