create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Why is Jest's version hard coded to "20.0.4"?

Open roneesh opened this issue 7 years ago • 1 comments

I'm updating my application right now and debugging some dependency issues. I just updated to Typescript 3 and updated react-scripts-ts to "3.1.0".

I'm currently getting an error when I run yarn test, which itself runs "react-scripts-ts test --env=jsdom --reporters default"

The error is:

Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)

This is a totally new issue for me, and so I am Googling around for how to handle it. I came upon this Create React App issue which explains it: https://github.com/facebook/create-react-app/issues/4540

In the issue they suggest to install Facebook's "watchman" to enable arbitrarily large amounts of files to be watched. But they also say that later versions of Jest don't need this.

I suspect that by hard coding to Jest 20.0.4 I am unable to get a fix for this particular issue? Is there any reason Jest is hardcoded at this version? Please note that I currently unable to determine if the fix for this issue was in 20.0.4, so it might be that this is a red herring. Regardless, I do feel that the question is still valid since now the latest react-scripts is 3 versions behind.

Is this an issue where I could help by doing a PR to update Jest? Or would you only update Jest's version as part of a larger release?

roneesh avatar Nov 09 '18 15:11 roneesh

@roneesh I tried to use a version past 20 and got an error message about a teardown function not being defined. I don't know why but we're stuck with jest 20 until that is solved.

insidewhy avatar Nov 17 '18 09:11 insidewhy