Expect multiple possible status code values
See original GitHub issueWhen testing POST operations against a service that performs de-duping, it’s common that I need to test for either 201
or 302
status codes.
It seems like it’d be easy to support in the code.
Here’s what I’d like to do:
.expect([201,302])
Issue Analytics
- State:
- Created 7 years ago
- Reactions:26
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Expect multiple possible status code values #389 - GitHub
When testing POST operations against a service that performs de-duping, it's common that I need to test for either 201 or 302 status...
Read more >How to test for multiple acceptable status codes in Postman?
In the test snippets, there is a test that would assert one status code: pm.test("Status code is 200", function () { pm.response ...
Read more >What HTTP status code to return if multiple actions finish with ...
A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
Read more >300 Multiple Choices - HTTP - MDN Web Docs - Mozilla
The HTTP 300 Multiple Choices redirect status response code indicates that the request has more than one possible responses.
Read more >HTTP Status Codes: All 63 explained - including FAQ & Video
The differences in classes are indicated through the first digit of the error code, for example: just like a 404, any other 4xx...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this one received 14 thumbs up. i can’t see the dates on these, but the too-old label should be based on the last thumbs-up rather than the date this was requested
@joniba @jderijke @rimiti Sent a PR here: https://github.com/visionmedia/supertest/pull/715