Skip to content

Instantly share code, notes, and snippets.

@craigspaeth
Created September 4, 2011 06:59
Show Gist options
  • Save craigspaeth/1192424 to your computer and use it in GitHub Desktop.
Save craigspaeth/1192424 to your computer and use it in GitHub Desktop.
Simple Jasmine spec helper to run an entire suite asynchronously
# Example usage:
#
# describe 'foo' ->
# runAsync()
# it 'tests things' ->
# expect(0 is 0).toBeTruthy()
# done()
#
_done = false
done = -> _done = true
runAsync = ->
beforeEach -> _done = false
afterEach -> waitsFor -> _done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment