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

Slow pending with cypress #1391

Closed
4 tasks done
iamyoki opened this issue Sep 6, 2022 · 3 comments
Closed
4 tasks done

Slow pending with cypress #1391

iamyoki opened this issue Sep 6, 2022 · 3 comments
Labels
bug Something isn't working needs:triage Issues that have not been investigated yet. scope:browser Related to MSW running in a browser

Comments

@iamyoki
Copy link

iamyoki commented Sep 6, 2022

Prerequisites

Environment check

  • I'm using the latest msw version
  • I'm using Node.js version 14 or higher

Browsers

Chromium (Chrome, Brave, etc.)

Reproduction repository

https://github.com/QhlabTeam/cra-template-qhlab/tree/msw-cypress-slow-issue

Reproduction steps

Clone

git clone https://github.com/QhlabTeam/cra-template-qhlab.git
cd cra-template-qhlab
git switch msw-cypress-slow-issue

Install

yarn install

Run cypress

yarn scripts
# Select tests
# Select e2e-test-mock

Run e2e

  • run 1-intro.cy.js
  • re-run, it becomes slowly after first run

Current behavior

Since the second re-run e2e test, it becomes very slow pending js chunks due to msw serviceworker

image

Expected behavior

Should be normal like the first time e2e runs.

@iamyoki iamyoki added bug Something isn't working needs:triage Issues that have not been investigated yet. scope:browser Related to MSW running in a browser labels Sep 6, 2022
@HeVictor
Copy link

Hi @iamyoki, I've had a crack attempting to re-create the bug from cloning your repository branch and installing the deps and then running the 1-intro.cy.js followed by a re-run (selecting the e2e testing type and Chrome through Cypress). Unfortunately, I wasn't able to encounter a slow execution like you described as the second run was also pretty quick like the first. Is it possible that I'm missing some steps or there are some differences in configuration and the like?

Screen Shot 2022-09-20 at 1 29 10 pm

I'm using the latest msw version with node v16.17.0, and I'm using a Mac with M1.

@iamyoki
Copy link
Author

iamyoki commented Sep 20, 2022

@HeVictor Thank you for respond,I'll check again.

@kettanaito
Copy link
Member

No updates for about a year, I will consider this issue not reproducible.

MSW doesn't do anything special to affect the response load times. If they take too much time, I suggest investigating that in your app/test setup. Start from the "Timings" tab in the Network to see what is taking that time. That can be a good first clue.

Update all the dependencies to their latest versions before doing any debugging. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage Issues that have not been investigated yet. scope:browser Related to MSW running in a browser
Projects
None yet
Development

No branches or pull requests

3 participants