Mock Request.redirect()
markjaquith opened this issue · 1 comments
markjaquith commented
Request.redirect()
isn't currently mocked.
https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect
I'm currently using this:
Response.redirect = (url: string, status: number = 302) =>
new Response(null, {
headers: {
Location: url,
},
status,
}
);
yinzara commented
Agreed, I think it's worth adding this if you wanted to submit a PR