8000 Improve usage checks in Request and Websocket · Issue #162 · gavv/httpexpect · GitHub
[go: up one dir, main page]

Skip to content

Improve usage checks in Request and Websocket #162

@gavv

Description

@gavv

Request and Websocket have the following workflow:

  • create instance
  • likely, call WithXXX() methods multiple times
  • call Expect() method

It is not allowed to call WithXXX() after Expect() is called. It is also not allowed to call Expect() more than once. However, these requirements are not documented and checked.

What we should do:

  • Document these requirements in comment for Expect.
  • Report failure if these requirements are violated with Type set to AssertUsage and an explanatory message.
  • Add unit tests that cover these failure reports.

Metadata

Metadata

Assignees

Labels

< 4582 div class="Section-module__childrenContainer__tpT2L">
featureNew feature or requesthelp wantedContributions are welcomeimportantImportant task

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0