afterEach(() => { cleanup() })
Using the React Testing Library debug method - LogRocket Blog react testing library
import { renderHook, act } from '@testing-library/react' afterEach(() => { cleanup() }) Using the React