Releases: mcansh/packages
Releases · mcansh/packages
@mcansh/vitest-response-matchers@0.1.0
Minor Changes
-
63750c9: add vitest response matchers package
initial set of matchers is the following
toHaveBody
- check that a Response has a body attatched to ittoHaveCookies
- check that a Response has any cookies, specified cookies, or a perfect matchtoHaveHeader
- check that a Response has a specific header (and value)toHaveJsonBody
- check that a Response's body matches the expected jsontoHaveStatus
- check that a Response's status matchestoHaveStatusText
- check that a Response's statusText matchestoHaveStrictStatusText
- a stricter version of the above that usesnode:http
to look up the status texttoHaveTextBody
- check that a Response's body matches the expected texttoMatchResponse
- check that a complete Response matchestoThrowResponse
- check that a function throws a Response