-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Karma example is unstable #56
Comments
Modifying beforeAll shows the state of the service worker is still this.beforeAll(async () => {
const registration = await worker.start()
console.log('registration: ', registration.installing, registration.waiting, registration.active)
}) Subsequent runs in watch mode work fine. I would expect the service worker is in the activated state after starting the worker through Bug in msw? |
Hey, @vitalii-retel. Thanks for reporting this. The worker's state doesn't seem valid, however, as the The fact that it doesn't work in Karma while working reliably in browsers, may suggest there is something different going on in the test setup. Of course, there's always room for an issue, but at this point, I doubt that. Would somebody be willing to investigate this further? Our team would help with the code navigation and reviews. |
It seems The integration tests in the |
Did you ever find a reliable answer to this? For now putting a timeout of 50ms works fine for me, but it feels FILTHY! Maybe related: mswjs/msw#854 |
No real solution. Up till now we work around it by calling
|
Thanks for finding that out, @wwsno. Chrome version is pinned by I'd like to learn more about the instability that the new version of Chrome introduced. Can somebody please share a link to that issue? |
We are no longer seeing this issue and removed the work-around. |
Description of an issue
It is quite simple. Just clone the repo. Then run
with-karma
example. Run the tests a few times in a row. Observe that sometimes they fail.After some investigation it was found that adding additional timeout, after starting the worker, solves the issue (looks like that at least).
Environment
The text was updated successfully, but these errors were encountered: