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 test runs #7106

Closed
leibole opened this issue Oct 5, 2018 · 3 comments
Closed

Slow test runs #7106

leibole opened this issue Oct 5, 2018 · 3 comments

Comments

@leibole
Copy link

leibole commented Oct 5, 2018

🐛 Bug Report

The simplest test runs very slow. It takes 6 seconds for just a 'should render' test. Any additional logic/test cases adds significant time to this, so it's not just overhead. I heard that you can run hundreds of tests in seconds with jest and jsdom.

The thing is, whenever I'm in watch mode and click 'a' to run all tests after running for the first time, the test takes last than a second. However, after saving a file in the project (while in watch mode), or running 'yarn test'/'yarn test --runInBand' the simplest test take 6 seconds.

The project was created with Create react app.

To Reproduce

Steps to reproduce the behavior:

you can look at the repo with the project:
https://github.com/leibole/sheeping-schedule

Expected behavior

A clear and concise description of what you expected to happen.

Link to repl or repo (highly encouraged)

https://github.com/leibole/sheeping-schedule

Run npx envinfo --preset jest

Paste the results here:

npx: installed 1 in 3.73s

  System:
    OS: OS X Yosemite 10.10.5
    CPU: x64 Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
  Binaries:
    Node: 10.9.0 - /usr/local/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.2.0 - /usr/local/bin/npm
@rogeliog
Copy link
Contributor

rogeliog commented Oct 5, 2018

Thanks for reporting, I think it is a dup of facebook/create-react-app#5304

@rogeliog rogeliog closed this as completed Oct 5, 2018
@leibole
Copy link
Author

leibole commented Oct 5, 2018

Any suggestion how to overcome this? Downgrade jest maybe?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants