Skip to content
New issue

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

Response.type throws in miniflare-like environments #478

Closed
mattcosta7 opened this issue Nov 7, 2023 · 1 comment · Fixed by #479
Closed

Response.type throws in miniflare-like environments #478

mattcosta7 opened this issue Nov 7, 2023 · 1 comment · Fixed by #479

Comments

@mattcosta7
Copy link
Contributor

if (mockedResponse.type === 'error') {

In environments like miniflare, Request.type is defined as a getter that throws.

We should write some tests to ensure that interceptors can work in miniflare (jest/vitest environment miniflare should support us here) and update to check something else or ignore this check entirely if the property access throws an error (like miniflare's does)

related to mswjs/msw#1834

@kettanaito
Copy link
Member

Released: v0.25.10 🎉

This has been released in v0.25.10!

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants