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

Terminal is flooded with warnings when running tests #938

Closed
benedikt-richter opened this issue Sep 7, 2022 · 1 comment
Closed

Terminal is flooded with warnings when running tests #938

benedikt-richter opened this issue Sep 7, 2022 · 1 comment

Comments

@benedikt-richter
Copy link
Member

When running tests, e.g. using yarn test:unit the terminal is flooded with warnings like:

  Warning: An update to $Component 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 */

Some of these warnings can be fixed by wrapping the testStore.dispatch(...) into an act(...) in the tests. However, not all of these warnings are fixable by this approach.

The goal of the current ticket is to get rid of the warnings.

Note: this might be related to our upgrade to React 18.

benedikt-richter added a commit to benedikt-richter/OpossumUI that referenced this issue Sep 13, 2022
Currently, the terminal is spammed when running tests.
Here we suppress output to the terminal related to issue opossum-tool#938.

Signed-off-by: Benedikt Richter <[email protected]>
@benedikt-richter
Copy link
Member Author

Superceded by #1273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants