-
Notifications
You must be signed in to change notification settings - Fork 765
.expect(status[, fn]) expect undefined response body !?! #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yep. Just came across this too. I wrote these tests to demonstrate the issue - first one is taken from the readme:
It must be the change to support multiple body assertions that has caused this bug. The workaround for now is to either don't use expect and do your assertion in the end function callback. So instead of |
a pull-requested test would be more helpful, then I can take a look at fixing it |
I reappear this bug and also fixed it on #41 |
When will this be put to npm? Almost all my tests are failing at the moment |
0.5.1 |
Hallo,
I tried to use this module to test my express app. But I got a strange error.
You may can reproduce it, if you try the following code with mocha. it based on your example.js:
If I run it with mocha, I got the following error message:
Why it expect an undefined body?
I guess that
.expect(status[, fn])
delegates the call to.expect(status, body[, fn])
and that check the body to be undefined.The text was updated successfully, but these errors were encountered: