visionmedia / expresso

use mocha
http://visionmedia.github.com/expresso
759 stars 89 forks source link

Feature async response #108

Closed nsabovic closed 13 years ago

nsabovic commented 13 years ago

Currently, failures in assert.response() are caught in on('uncaughtException'). This causes check() to not be called, and the server keeps running, node never exits, and our test bots get stuck.

This branch catches exceptions in the handler, and therefore attributes errors to the correct suite/test. It also runs cleanup in the finally block, so that the server is always shut down.

tj commented 13 years ago

I still get the wrong title (not that it's worse than before haha)

mehtryx commented 13 years ago

you know, same here, I actually get completely wrong error messages if I have a series of tests that are using the assert.response ( my one spec file has 10 of these ) the last test is always the title and message I get even if the simpliest and first test is the one I make fail.

tj commented 13 years ago

i'll have to git bisect some time and see where things went wrong, or if it ever even worked properly haha

kkaefer commented 13 years ago

This should work in 0.9.0.