Skip to content

Improve unit tests for React 17 PR - #56004

Merged
noahtallen merged 2 commits into
trunkfrom
improve/tests-react-17
Sep 3, 2021
Merged

noahtallen merged 2 commits into
trunkfrom
improve/tests-react-17

Conversation

@noahtallen

Copy link
Copy Markdown
Contributor

Changes proposed in this Pull Request

There were two issues with unit tests in the React 17 PR (#54793).

  1. With the latest wp monorepo updates, i18n.setLocale needs to be wrapped in act.
  2. With the latest react/test environment, we need to set jest.useFakeTimers() in order for some ETK tests to pass. This is because the dependency wait-for-expect uses timeouts under the hood to wait for a fake network request to finish.

Testing instructions

  • CI

@noahtallen
noahtallen requested a review from a team September 3, 2021 21:38
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 3, 2021
@github-actions

github-actions Bot commented Sep 3, 2021 •

Copy link
Copy Markdown

@matticbot

Copy link
Copy Markdown
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit improve/tests-react-17 on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@matticbot

Copy link
Copy Markdown
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@noahtallen
noahtallen merged commit e10d909 into trunk Sep 3, 2021
@noahtallen
noahtallen deleted the improve/tests-react-17 branch September 3, 2021 21:56
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants