PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
32 stars 86 forks source link

Update various parts of Jest that will be deprecated with React 19 #1685

Closed anth-volk closed 1 week ago

anth-volk commented 2 weeks ago

View the build log at https://github.com/PolicyEngine/policyengine-app/pull/1680 to find which ones they are. Most of these are parts of the React Jest library that will be incorporated into React fully starting with v19, but which have already been migrated as of v18.3

czhou578 commented 2 weeks ago

@anth-volk, after doing some research, it seems like the console.log errors below are being caused by react-testing-library, and not Jest itself. There are quite a number of articles talking about this, and none of them say that Jest is specifically the issue. There is a dependabot PR currently active that bumps @testing-library/react to version 15.0.5. But it seems that version 15.0.6 just dropped yesterday, which deals with the "act" import error. What are your thoughts on this?

A link to the issue: https://github.com/facebook/react/issues/28915

image image

anth-volk commented 1 week ago

Huh, interesting, thanks for this research @czhou578. I had held off on merging #1676, as the version numbering implies breaking changes, and I wanted some time to test them. In that case, would you mind doing a bit of testing to see if there are any major changes if we upgrade to the new versions of @testing-library/react (and if necessary, the next minor version of React itself)?