Closed albertogasparin closed 9 months ago
This is one way to solve the problem, another way is to enforce cleanup between tests:
Yes, might eventually go down that path. For now my worry was with tests and storybooks blowing up and then leaks would happen
:fingerguns: we definitely missing this sort of cleanup for storybook and tests
Whenever
<DiProvider global />
is used and the tree throws an error, we skip the unmount use effect and replacements between tests are not cleared.We should convert DiProvider to a class and add
componentDidCatch
to callglobalDi.clear()