Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Admin recovery test: the router mock gives useLocation too, the admin page reads it now (#683)

Duarte Santos7b3f4ea8f57f
diff --git a/frontend/src/views/Admin.recovery.test.jsx b/frontend/src/views/Admin.recovery.test.jsx
index 09d11e61a..1ad4dffa5 100644
--- a/frontend/src/views/Admin.recovery.test.jsx
+++ b/frontend/src/views/Admin.recovery.test.jsx
@@ -29,7 +29,7 @@ vi.mock('../store/useUI.js', () => {
useUI.getState = snap
return { useUI }
})
-vi.mock('react-router-dom', () => ({ useNavigate: () => () => {} }))
+vi.mock('react-router-dom', () => ({ useNavigate: () => () => {}, useLocation: () => ({ state: null }) }))
vi.mock('../sheets.jsx', () => ({ confirmSheet: (...a) => mocks.confirm(...a) }))
vi.mock('./AdminCoach.jsx', () => ({ default: () => null }))