Closed splindsay-92 closed 1 month ago
Status | Category | Percentage | Covered / Total |
---|---|---|---|
🟢 | Lines | 94.18% (🎯 92%) | 2755 / 2925 |
🟢 | Statements | 94.18% (🎯 92%) | 2755 / 2925 |
🟢 | Functions | 96.33% (🎯 93%) | 210 / 218 |
🟢 | Branches | 94.65% (🎯 93%) | 744 / 786 |
Context
useLogger
mock was defined in tests. When the hooks re-render, they call theuseLogger
hook, we provided an arrow function that returns a new instance each time, this caused anyuseEffect
dependant on it to re-render.Description
useLogger
hook, which should return a memoized object, I have moved the logger creation to thebeforeEach
test setup. This way, it is created only once per test.