Created
January 13, 2012 15:27
-
-
Save dhepper/1606967 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
assert = require 'assert' | |
vows = require 'vows' | |
tornDown = false | |
vows.describe('Vows with asynchronous teardowns').addBatch | |
'Context with long-running teardown': | |
'is run first': () -> | |
teardown: () -> | |
setTimeout(() => | |
tornDown = true | |
@callback() | |
return | |
, 1000) | |
return | |
.addBatch | |
'The next batch': | |
'is not run until the teardown is complete': () -> | |
assert.ok tornDown | |
.export module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment