fix: align frontend types and tests for react 19 (#339)

This commit is contained in:
Daniel Volz
2026-02-27 01:01:48 +01:00
committed by GitHub
parent 6b27d234d9
commit cc22f80209
23 changed files with 166 additions and 74 deletions
+2 -2
View File
@@ -281,13 +281,13 @@ describe("useSettings", () => {
it("refreshes reminder status on interval", async () => {
let refreshCallback: (() => void) | null = null;
const nativeSetInterval = global.setInterval;
vi.spyOn(global, "setInterval").mockImplementation((handler: TimerHandler, timeout?: number) => {
vi.spyOn(global, "setInterval").mockImplementation(((handler: TimerHandler, timeout?: number) => {
if (timeout === 30000) {
refreshCallback = handler as () => void;
return 1 as unknown as ReturnType<typeof setInterval>;
}
return nativeSetInterval(handler, timeout);
});
}) as typeof setInterval);
(global.fetch as ReturnType<typeof vi.fn>)
.mockResolvedValueOnce({ ok: true, json: () => Promise.resolve({}) })