react-testing-library-course icon indicating copy to clipboard operation
react-testing-library-course copied to clipboard

Testing configuration runs slow on Windows 10

Open SimeonRolev opened this issue 4 years ago • 7 comments

Hi,

I purchased the course and didn't change any of the setup, but the test run really slow (3-6s). I use Windows 10 and saw that someone else filed this issue: https://github.com/facebook/jest/issues/7631. I commented there as well describing my issue in more details, but I don't see much of an activity towards resolving it. Is there a fix that you know of?

Thanks!

SimeonRolev avatar Oct 14 '20 10:10 SimeonRolev

I'm afraid I have no more to offer than what is suggested in that issue. Did you try installing watchman?

kentcdodds avatar Oct 14 '20 12:10 kentcdodds

@SimeonRolev can you try to run jest directly from inside the repo.

"test": "kcd-scripts test",

yarn test is calling kcd-scripts maybe something inside is creating this behavior?

i ll look at it again when i find time

nasreddineskandrani avatar Oct 15 '20 20:10 nasreddineskandrani

kcd-scripts has a few nice things built-in, but it's unlikely to cause this problem. However, it's possible. You should be able to run npx jest and it'll run all the tests, you can run npx jest --watch to run in watch mode.

kentcdodds avatar Oct 15 '20 20:10 kentcdodds

image

npx jest --watch -> p -> this file. Hit enter multiple times, because the first run is always slow.

I got a dual boot with Ubuntu, so there it is as well: Screenshot from 2020-10-21 13-29-27

SimeonRolev avatar Oct 21 '20 10:10 SimeonRolev

Odd. Unfortunately I don't have the bandwidth to look into this.

kentcdodds avatar Oct 21 '20 20:10 kentcdodds

I'll look at it during next week. I am interested to learn how to debug well jest anyway...

nasreddineskandrani avatar Oct 22 '20 07:10 nasreddineskandrani

a little busy :P i'll take the time to check it during my vacations in first week of january.

nasreddineskandrani avatar Nov 14 '20 11:11 nasreddineskandrani