-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Improve usage checks in Request and Websocket #162
Comments
Hi @gavv, may I work on this? I am not sure how to check for the violations. The |
Hi, I mean the follwoing misuses:
|
Let me know if you would like to be assigned. |
Yes please, thanks! |
For Websocket, some of the tests in e2e calls |
Oh, you're right. Websocket.Expect is intended to be called multiple times, once for each message. Seems it's also okay to call WithXxx methods between Expect calls. So no modifications are needed in Websocket, this issue is relevant only for Request. |
Request
andWebsocket
have the following workflow:WithXXX()
methods multiple timesExpect()
methodIt is not allowed to call
WithXXX()
afterExpect()
is called. It is also not allowed to callExpect()
more than once. However, these requirements are not documented and checked.What we should do:
Expect
.Type
set toAssertUsage
and an explanatory message.The text was updated successfully, but these errors were encountered: