Skip to content

Fix failing tests in latest 16.x and 18.x Node versions #25378

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

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Oct 1, 2022

Summary

Fixes full test matrix when using latest Node versions.

Unblocks #25374

#25348 is still blocked: https://app.circleci.com/pipelines/github/facebook/react/32861/workflows/e0e04ca7-b376-44dc-8fa3-0ccf76b64035/jobs/554401

How did you test this change?

await act(async () => {
await sleep(50);
});
})();
Copy link
Collaborator Author

@eps1lon eps1lon Oct 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This led to an unhandled promise rejection and therefore uncaught exception in latest Node 16.x and 18.x. Jest did not considerd this test failed and instead exited. Though it seems to me that it should? /cc @SimenB

New code results in no unhandled promise reject while still ensuring these act calls are interleaved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should definitely pick up unhandled rejections - could you open up an issue so we at least track it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimenB jestjs/jest#9210 seems like it's tracking the same issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test (before this PR) passes using jest-circus fwiw. So seems to be a jasmine problem

@sizebot
Copy link

sizebot commented Oct 1, 2022

Comparing: 7b25b96...0244832

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 135.47 kB 135.47 kB = 43.41 kB 43.41 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 147.73 kB 147.73 kB = 47.17 kB 47.17 kB
facebook-www/ReactDOM-prod.classic.js = 491.69 kB 491.69 kB = 87.49 kB 87.49 kB
facebook-www/ReactDOM-prod.modern.js = 476.98 kB 476.98 kB = 85.24 kB 85.24 kB
facebook-www/ReactDOMForked-prod.classic.js = 491.69 kB 491.69 kB = 87.49 kB 87.49 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 0244832

@kassens
Copy link
Member

kassens commented Oct 1, 2022

Thank you for debugging!

@kassens kassens merged commit 0033d1a into facebook:main Oct 1, 2022
@eps1lon eps1lon deleted the test/fix-latest-node-versions branch October 1, 2022 22:57
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.

5 participants