-
Notifications
You must be signed in to change notification settings - Fork 85
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
Jest tests taking longer than they should #71
Comments
Even if you can guide me on how to use I cant seem to run just jest as I keep getting |
So for anyone following this I hacked this to solve my issue for now. I decided to just go around the entire re-start setup to solve the issue. It was the only way I could solve it with no direction from the repo owners. So I changed package.json script test to be Then I created my own jest.config.js file and put it in my root dir
Then for gitlab runner I use |
Step 3: Describe the problem (try to include screenshots):
Running
yarn test
or even justyarn test:native
seems to take much longer than it should. Running locally on my machine, running in a docker container and running it GitLab CI/CD all do this, which leads me to think its some setup here.Steps to reproduce:
I am not sure if it is one file or all or what. I have 8 test files and 32 tests... nothing big at all. One test that continually seems to take over 50 seconds to run is this component and this test. As you will see this is not a complex file or test.
Yet I continually get the following:
PASS src/components/__tests__/HR.test.js (52.81s)
Well... its actually more like this - again... none of these files is bigger than maybe 50 lines of code:
HR.js
HR.test.js
Observed Results:
When running locally I see
PASS src/components/__tests__/HR.test.js (52.81s)
When watching in GitLab CI/CD I get
--detectOpenHandles does nothing given all the routing through config files that you have setup. So not sure how to implement that.
Expected Results:
The test should run in a second or two... not 50+ seconds
Additional information
Here are the contents of my gitlab-ci.yml file
The text was updated successfully, but these errors were encountered: