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

fix(setupServer): reapply interception after calling server.listen() after server.close() #2383

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Dec 6, 2024

Changes

The request event listener of the interceptor is not called in the .listen() method (previously, SetupServerCommonApi constructor). This ensures that close -> listen scenario re-attaches the interceptor listeners to keep the interception working.

@kettanaito kettanaito marked this pull request as ready for review December 6, 2024 12:56
@kettanaito kettanaito merged commit 00da9ca into main Dec 6, 2024
17 checks passed
@kettanaito kettanaito deleted the fix/2370 branch December 6, 2024 12:57
@kettanaito
Copy link
Member Author

Released: v2.6.8 🎉

This has been released in v2.6.8!

Make sure to always update to the latest version (npm i msw@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

server.listen() called after server.close() does not mock response
1 participant