Skip to content

chore: upgrade to Jest 26 #18816

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

Closed
wants to merge 1 commit into from
Closed

chore: upgrade to Jest 26 #18816

wants to merge 1 commit into from

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented May 4, 2020

Summary

As mentioned in #18815, it's incoming. I mostly wanna test the new (opt-in) fake timers, but I thought to open a PR with just the bump as well. Includes #18815, so you can choose to just merge this one if you want.

Draft for now as 26 is still alpha.

Test Plan

Green CI

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 4, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f40c39a:

Sandbox Source
clever-dream-y035t Configuration

@sizebot
Copy link

sizebot commented May 4, 2020

Details of bundled changes.

Comparing: 9751935...f40c39a

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.production.min.js -0.8% 🔺+2.3% 22.65 KB 22.48 KB 7.65 KB 7.82 KB NODE_PROD
eslint-plugin-react-hooks.development.js -4.3% -0.2% 81.73 KB 78.2 KB 18.68 KB 18.65 KB NODE_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactTestRenderer-dev.js -0.1% -0.0% 573.83 KB 573.52 KB 121.6 KB 121.57 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% -0.0% 39.16 KB 39.16 KB 9.57 KB 9.57 KB UMD_DEV
react-test-renderer.development.js -0.0% -0.0% 573.03 KB 573.02 KB 119.63 KB 119.62 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 74.62 KB 74.62 KB 22.76 KB 22.76 KB UMD_PROD
react-test-renderer.development.js -0.0% -0.0% 546.36 KB 546.36 KB 118.25 KB 118.24 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 74.42 KB 74.42 KB 22.42 KB 22.42 KB NODE_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.production.min.js 0.0% -0.1% 13.05 KB 13.05 KB 4.8 KB 4.79 KB NODE_PROD
react-dom-server.browser.development.js -0.0% -0.0% 154.95 KB 154.94 KB 39.49 KB 39.49 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.16 KB 1.16 KB 660 B 659 B NODE_PROD
ReactDOMForked-dev.js 0.0% -0.0% 1.01 MB 1.01 MB 232.35 KB 232.35 KB FB_WWW_DEV
ReactDOMForked-prod.js 0.0% -0.0% 429.4 KB 429.4 KB 77.23 KB 77.23 KB FB_WWW_PROD
react-dom.development.js 0.0% -0.0% 908.04 KB 908.04 KB 199.71 KB 199.71 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.83 KB 119.83 KB 38.42 KB 38.42 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 123.6 KB 123.6 KB 39.62 KB 39.62 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% -0.0% 936.12 KB 936.12 KB 208.77 KB 208.77 KB FB_WWW_DEV
react-dom.development.js 0.0% -0.0% 864.34 KB 864.34 KB 197.19 KB 197.19 KB NODE_DEV
react-dom-server.node.development.js -0.0% -0.0% 147.01 KB 147.01 KB 38.97 KB 38.97 KB NODE_DEV
react-dom-test-utils.development.js 0.0% 0.0% 75.28 KB 75.28 KB 20.18 KB 20.18 KB UMD_DEV
react-dom.profiling.min.js 0.0% -0.0% 123.85 KB 123.85 KB 38.79 KB 38.79 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.0% 13.17 KB 13.17 KB 4.89 KB 4.89 KB UMD_PROD
ReactDOM-dev.js 0.0% -0.0% 1.01 MB 1.01 MB 231.53 KB 231.53 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 70.11 KB 70.11 KB 19.67 KB 19.67 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.6 KB 5.6 KB 1.86 KB 1.85 KB NODE_DEV
react-dom-server.browser.development.js -0.0% -0.0% 145.79 KB 145.79 KB 38.72 KB 38.72 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 22.87 KB 22.87 KB 8.51 KB 8.51 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.35 KB 5.35 KB 1.8 KB 1.8 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.19 KB 1.19 KB 698 B 696 B UMD_PROD
ReactDOMServer-dev.js -1.0% -0.1% 163.85 KB 162.24 KB 41.76 KB 41.71 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% -0.0% 52.9 KB 52.9 KB 12.74 KB 12.74 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 4.85 KB 4.85 KB 1.7 KB 1.69 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1 KB 1 KB 610 B 608 B NODE_PROD

Size changes (stable)

Generated by 🚫 dangerJS against f40c39a

@sizebot
Copy link

sizebot commented May 4, 2020

Details of bundled changes.

Comparing: 9751935...f40c39a

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer-shallow.development.js 0.0% -0.0% 39.17 KB 39.17 KB 9.58 KB 9.58 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 12.74 KB 12.74 KB 3.97 KB 3.97 KB UMD_PROD
ReactTestRenderer-dev.js -0.1% -0.0% 573.85 KB 573.53 KB 121.61 KB 121.58 KB FB_WWW_DEV
react-test-renderer.development.js -0.0% -0.0% 573.05 KB 573.05 KB 119.64 KB 119.63 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 74.64 KB 74.64 KB 22.78 KB 22.78 KB UMD_PROD
react-test-renderer.development.js -0.0% -0.0% 546.39 KB 546.38 KB 118.26 KB 118.25 KB NODE_DEV
react-test-renderer.production.min.js 0.0% -0.0% 74.44 KB 74.44 KB 22.44 KB 22.44 KB NODE_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.development.js 0.0% 0.0% 75.29 KB 75.29 KB 20.19 KB 20.19 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.36 KB 5.36 KB 1.81 KB 1.8 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 13.18 KB 13.18 KB 4.9 KB 4.9 KB UMD_PROD
ReactDOMTesting-dev.js 0.0% -0.0% 910.32 KB 910.32 KB 203.22 KB 203.22 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.2 KB 1.2 KB 706 B 704 B UMD_PROD
react-dom.development.js 0.0% -0.0% 941.92 KB 941.93 KB 206.19 KB 206.19 KB UMD_DEV
react-dom-server.browser.development.js -0.0% -0.0% 162.26 KB 162.25 KB 41.29 KB 41.28 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 124.67 KB 124.67 KB 39.91 KB 39.9 KB UMD_PROD
ReactDOMForked-dev.js 0.0% -0.0% 1009.84 KB 1009.84 KB 226.68 KB 226.68 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 23.43 KB 23.43 KB 8.61 KB 8.61 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 128.54 KB 128.54 KB 41.06 KB 41.05 KB UMD_PROFILING
react-dom.development.js 0.0% -0.0% 896.77 KB 896.77 KB 203.63 KB 203.63 KB NODE_DEV
ReactDOMForked-profiling.js 0.0% -0.0% 427.51 KB 427.51 KB 76.84 KB 76.84 KB FB_WWW_PROFILING
react-dom-server.browser.development.js -0.0% -0.0% 152.74 KB 152.74 KB 40.52 KB 40.51 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 124.87 KB 124.87 KB 39.02 KB 39.02 KB NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 23.32 KB 23.32 KB 8.6 KB 8.6 KB NODE_PROD
react-dom.profiling.min.js 0.0% -0.0% 128.88 KB 128.88 KB 40.31 KB 40.31 KB NODE_PROFILING
ReactDOM-dev.js 0.0% -0.0% 1013.71 KB 1013.71 KB 225.93 KB 225.93 KB FB_WWW_DEV
ReactDOMServer-dev.js -1.0% -0.2% 160.35 KB 158.74 KB 40.85 KB 40.77 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% -0.0% 422.22 KB 422.22 KB 74.58 KB 74.58 KB FB_WWW_PROD
ReactDOMServer-prod.js 0.0% -0.0% 52.01 KB 52.01 KB 12.56 KB 12.55 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.61 KB 5.61 KB 1.87 KB 1.86 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.3% 1.17 KB 1.17 KB 669 B 667 B NODE_PROD
ReactDOMTesting-prod.js 0.0% -0.0% 379 KB 379 KB 69.18 KB 69.17 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 70.12 KB 70.12 KB 19.68 KB 19.68 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 4.87 KB 4.87 KB 1.71 KB 1.7 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.1% 13.06 KB 13.06 KB 4.81 KB 4.8 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.02 KB 1.02 KB 618 B 616 B NODE_PROD
react-dom-server.node.development.js -0.0% -0.0% 153.96 KB 153.96 KB 40.77 KB 40.77 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 23.73 KB 23.73 KB 8.75 KB 8.75 KB NODE_PROD

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js -4.3% -0.2% 81.74 KB 78.21 KB 18.69 KB 18.65 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js -0.8% 🔺+2.2% 22.66 KB 22.49 KB 7.66 KB 7.83 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against f40c39a

@gaearon
Copy link
Collaborator

gaearon commented Jul 8, 2020

@SimenB We're running into a need for the latest jsdom, which would require us to get on Jest 26. Any chance you want to revive this PR? I'd be happy to assist with missing bits.

@rickhanlonii
Copy link
Member

Could we patch Jest 25 with a new jsdom patch version or does it include more changes then just this?

@gaearon
Copy link
Collaborator

gaearon commented Jul 8, 2020

We're gonna go with a custom jsdom fork for the time being but this is a liability.

@eps1lon
Copy link
Collaborator

eps1lon commented Jul 8, 2020

Can you override the default environment jest is using in this repo and use jest-environment-jsdom-sixteen instead? That way you can split up the work required for jest 26 into two parts: fixing broken test due to jsdom 16 and fixing broken tests due to jest 26.

@SimenB
Copy link
Contributor Author

SimenB commented Jul 8, 2020

jest-environment-jsdom-sixteen is for jest 25, so you can use that 👍

Currently on vacation, so I cannot promise being able to revive this within the next few weeks. Can do in early August though. But again, you can use jest-environment-jsdom-sixteen if all you want/need is latest JSDOM

@rickhanlonii
Copy link
Member

PR to use jest-environment-jsdom-sixteen here, we can land that after JSDOM publishes the fix.

@SimenB
Copy link
Contributor Author

SimenB commented Oct 2, 2020

#19920

@SimenB SimenB closed this Oct 2, 2020
@SimenB SimenB deleted the jest-26 branch October 2, 2020 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants