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

Tests: fix async updates in tests #540

Merged
merged 2 commits into from
Jul 9, 2024
Merged

Conversation

matyax
Copy link
Contributor

@matyax matyax commented Jul 9, 2024

This PR fixes errors that pollute Jest output, such as:

console.error
      Warning: An update to PatternTag inside a test was not wrapped in act(...).
      
      When testing, code that causes React state updates should be wrapped into act(...):
      
      act(() => {
        /* fire events that update state */
      });
      /* assert on the output */

@matyax matyax requested a review from a team as a code owner July 9, 2024 15:19
@matyax matyax enabled auto-merge (squash) July 9, 2024 15:22
@matyax matyax force-pushed the matyax/async-update-test-error branch from 904109f to 9a93f75 Compare July 9, 2024 15:22
@matyax matyax merged commit 3005a1c into main Jul 9, 2024
3 checks passed
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