Created
April 22, 2011 11:47
-
-
Save gmiroshnykov/936508 to your computer and use it in GitHub Desktop.
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
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); | |
}, | |
'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