We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe.
I'm creating some tests for a server handler, and assertObjectMatch didn't work as expected on the responses.
Describe the solution you'd like
That
assertObjectMatch(new Response(), { status: 200 }); assertObjectMatch(new Response(null, { status: 400, statusText: "Not Found" }), { status: 400, statusText: "Not Found" });
would work.
Describe alternatives you've considered
The Response object does not have enumerable properties, so there's no elegant way to convert it into a plain object.
An alternative is to map the values manually:
const response = new Response() assertObjectMatch( { status: response.status }, { status: 200 } )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
I'm creating some tests for a server handler, and assertObjectMatch didn't work as expected on the responses.
Describe the solution you'd like
That
would work.
Describe alternatives you've considered
The Response object does not have enumerable properties, so there's no elegant way to convert it into a plain object.
An alternative is to map the values manually:
The text was updated successfully, but these errors were encountered: