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

multiple handers is not working #16

Open
DylanJu opened this issue Sep 13, 2024 · 0 comments
Open

multiple handers is not working #16

DylanJu opened this issue Sep 13, 2024 · 0 comments

Comments

@DylanJu
Copy link

DylanJu commented Sep 13, 2024

I would like to replace from msw-storybook-addon to storybook-msw-addon.
But it is not working with multiple handers but working well with single handler.
I don't know why and how to solve this.

handlers: [
  http.get('/endpoint1', () => {
      return HttpResponse.json({
        flag: true,
      });
    }),
  http.get('/endpoint2', () => {
      return HttpResponse.json({
        flag: false,
      });
    }),
],

It is always failed because /endpoint2404.

macOS silicon
msw: 2.0.11
storybook: 8.2.8
storybook-msw-addon: 2.1.5
yarn pnp: 3.6.1

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