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

How to overwrite the handlers using the array definition? #114

Open
BrunoQuaresma opened this issue May 23, 2023 · 1 comment
Open

How to overwrite the handlers using the array definition? #114

BrunoQuaresma opened this issue May 23, 2023 · 1 comment

Comments

@BrunoQuaresma
Copy link

Hey folks, I have a few dozen handlers being used in MSW as an array and I see to overwrite it using the addon I would have to make them "named handlers" which from the setupServer() definition is not allowed. It would also require a high amount of effort to convert them into an object map.

So is there a way to overwrite the initial global handlers in the story similar to server.use(...)? So I would not have to change my handler's definition and be able to use them on Storybook and regular tests.

Thank you!

@BrunoQuaresma
Copy link
Author

Kinda of related #82

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

No branches or pull requests

1 participant