explicit process.exit for serial-mode#128
explicit process.exit for serial-mode#128shivaken wants to merge 1 commit intovisionmedia:masterfrom shivaken:67b48694469858dcc3d4ed74ebc4ac3a55b2d80d
Conversation
…-mode test execution.
|
I'm having the same problem with the node-postgres module. Thx for the commit, applied it already to my local expresso. |
|
Same problem here when testing with socket.io. I came up with a fix that looks just like the one from shivaken, however, it doesn't solve the problem because when |
|
|
Hey, thanks for your answer. Yes. My tests are taking the callback and calling it when the test is done; I'm using --serial because I'm testing a socket.io so the first argument of my test functions should be that callback, shouldn't it? I finally I fixed it wrapping the Here's the pull request: #148 feel free to give it a try. Also, not sure if useful, I'm using Expresso 0.9.2 in Lion |
|
Thank you Ignacioiglesias. I don't understand why you have to wrap 'process.exit' by 'process.nextTick'. 'Failure: Only 1 of 3 suites have been started' I'm using latest express + my patch in node-0.4.12, Snow Leopard. |
|
It wasn't clear to me why wrapping To answer your question about executing tests one by one, I still need to use I wonder if this has to do with the OS. |
|
'--serial' will execute test sync not only test suite. so If your test suite has two or more tests, you have to use with '--serial'. for example, In my test, server is created only one time in initializing code that was separated from test code and just include via 'require' in test suite code. then use server in test method. |
|
@shivaken: I think I didn't express myself correctly; Given the nature of my tests, I am always using Regarding your suggestion about the usage of |
With mongoose, expresso doesn't exit. Make expresso exit after serial-mode test execution.