Skip to content

Instantly share code, notes, and snippets.

@dangerbell
Created November 1, 2012 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dangerbell/3994989 to your computer and use it in GitHub Desktop.
Save dangerbell/3994989 to your computer and use it in GitHub Desktop.
Example of an async test in Mocha
describe "Google", ->
describe "stuff", ->
it "should return success", (done) ->
options =
host: "www.google.com"
method: "GET"
google = http.request options, (res) ->
res.should.have.status 200
done()
google.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment