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

[Chore] Unit tests modifying React state without wrapping in act #379

Open
justinkambic opened this issue Feb 8, 2023 · 0 comments
Open
Labels

Comments

@justinkambic
Copy link
Contributor

Task summary

As noted in RTL docs, any function call that causes an update to React state must be wrapped in a call to act. We've failed to do this in numerous tests and thus are receiving some console errors when running tests.

You can see these errors simply by running npm run test:unit.

To fix this, wrap the state modifying code in act per the docs linked above.

Linked resources

Test files where this is happening:

Additional information

No response

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

No branches or pull requests

1 participant