Skip to content
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

Fix loading react, react-dom, and react-dom/client.js for unit tests #5238

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

softwarenerd
Copy link
Contributor

@softwarenerd softwarenerd commented Oct 31, 2024

Description

This PR fixes how react, react-dom, and react-dom/client.js are loaded in unit tests. This fixes the unit test hang that was seen as a result of #5181.

QA Notes

yarn test-browser-no-install --browser chromium is now working again. If you run:

yarn test-browser-no-install --browser chromium --debug

You will see new output that shows how we are loading react-dom/client.js:

loader.js:1641 ------------------------------------------------------------------------
loader.js:1641 Changing where the react-dom client.js file is loaded from.
loader.js:1642 Original path: http://localhost:59048/46eec0d9769be1346e735ed63b8fd4da/node_modules/react-dom/umd/react-dom.production.min.js/client.js
loader.js:1643 Adjusted path: http://localhost:59048/46eec0d9769be1346e735ed63b8fd4da/out/react-dom/client.js
loader.js:1648 ------------------------------------------------------------------------
image

This work also fixes the long-standing warnings that were happening when loading the notebookServiceImpl.test module:

image

@petetronic
Copy link
Collaborator

Tested this branch locally, and with recompiling, confirmed that the browser chromium unit tests no longer hang 🎉

@softwarenerd softwarenerd merged commit 0d7a6e8 into main Oct 31, 2024
8 checks passed
@softwarenerd softwarenerd deleted the ui/re-enable-editor-action-bar branch October 31, 2024 23:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants