Skip to content

Instantly share code, notes, and snippets.

@gmiroshnykov
Created April 22, 2011 11:46
Show Gist options
  • Save gmiroshnykov/936507 to your computer and use it in GitHub Desktop.
Save gmiroshnykov/936507 to your computer and use it in GitHub Desktop.
var vows = require('vows'),
assert = require('assert');
vows.describe('Buggy Test').addBatch({
'when async test returns error': {
topic: function() {
var callback = this.callback;
setTimeout(function() {
callback(new Error());
}, 100);
},
//'it fails on empty vow': function(error) {},
'and we use nested context': {
// the actual code below is not important
// it's just to work around "Could not find any tests to run." error.
topic: function() {
var callback = this.callback;
process.nextTick(function() {
callback(null, 'Hello World');
});
},
'we receive "Hello World"': function(message) {
assert.equal(message, 'Hello World');
}
}
}
}).export(module);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment