gsoft-inc / sg-orbit

The design system for ShareGate web apps.
https://orbit.sharegate.design
Apache License 2.0
101 stars 37 forks source link

⚙️ Warning when running tests #1082

Open alexasselin008 opened 1 year ago

alexasselin008 commented 1 year ago

Describe the bug

Multiple tests don't break, but display the following erro rmessage:

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

Steps to reproduce

run yarn jest

notice the warning appearing in the console

Expected results

no warning is displayed