rsm-hcd / AndcultureCode.JavaScript.React

Common patterns, functions, etc... used when building react applications
6 stars 8 forks source link

Fix use-window.test.tsx to use act #61

Closed myty closed 3 years ago

myty commented 3 years ago

Fixes #45 console warnings

Per https://react-hooks-testing-library.com/usage/basic-hooks#updates, whenever an action causes the state of the hook to change, it should be wrapped in act

codecov[bot] commented 3 years ago

Codecov Report

Merging #61 (3f4160d) into main (b6bba47) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   94.62%   94.62%           
=======================================
  Files          16       16           
  Lines         242      242           
  Branches       27       27           
=======================================
  Hits          229      229           
  Misses         12       12           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b6bba47...0a76eba. Read the comment docs.

brandongregoryscott commented 3 years ago

Awesome, thanks for fixing this up @myty!