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

Remove act warnings from grant-explorer test output #2715

Open
bard opened this issue Dec 1, 2023 · 0 comments
Open

Remove act warnings from grant-explorer test output #2715

bard opened this issue Dec 1, 2023 · 0 comments

Comments

@bard
Copy link
Contributor

bard commented Dec 1, 2023

Example:

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

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
    at RoundProvider (/home/bard/projects/gitcoin/grants-stack/packages/grant-explorer/src/context/RoundContext.tsx:52:26)
    at DataLayerProvider (/home/bard/projects/gitcoin/grants-stack/packages/data-layer/dist/react.js:7:30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants