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

Delay is ignored #45

Closed
SetupCoding opened this issue Dec 2, 2022 · 1 comment · Fixed by #49
Closed

Delay is ignored #45

SetupCoding opened this issue Dec 2, 2022 · 1 comment · Fixed by #49

Comments

@SetupCoding
Copy link
Contributor

Using a handler like

export const getAccountMSW = () => [
  rest.get('http://localhost:8080/account', (_req, res, ctx) => {
    return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountMock()));
  }),
];

in msw results in times around one second:
image

When using playwright-msw with the same handler the delay seems to be ignored (1-6ms RTT)

image

@SetupCoding SetupCoding changed the title Delay is disregarded Delay is ignored Dec 2, 2022
@valendres valendres linked a pull request Dec 13, 2022 that will close this issue
@SetupCoding
Copy link
Contributor Author

The fix works. Would love to see it in the next release :D

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.

1 participant