Created
January 13, 2012 15:31
-
-
Save dhepper/1606988 to your computer and use it in GitHub Desktop.
This file contains 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'); | |
vows.describe("Vows with asynchonous teardowns").addBatch({ | |
"Context with long-running teardown": { | |
"is run first": function () {}, | |
teardown: function () { | |
var callback = this.callback; | |
setTimeout(function () { | |
tornDown = true; | |
callback(); | |
}, 100); | |
} | |
} | |
}).addBatch({ | |
"The next batch": { | |
"is not run until the teardown is complete": function () { | |
assert.ok(tornDown); | |
} | |
} | |
}).export(module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment