react-fontpicker icon indicating copy to clipboard operation
react-fontpicker copied to clipboard

Vitest test warnings

Open ae9is opened this issue 1 year ago • 0 comments

Vitest tests pass but throw the following warning multiple times:

Warning: An update to App 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

ae9is avatar Apr 28 '24 01:04 ae9is