Openstatus www.openstatus.dev

🧪 fix tests🧪 (#482)

authored by

Thibault Le Ouay and committed by
GitHub
5696d454 0e08a6f2

+7 -7
+7 -7
apps/server/src/checker/checker.test.ts
··· 8 8 }; 9 9 }); 10 10 11 - test("should call updateMonitorStatus when we can fetch", async () => { 11 + test("should call upsertMonitorStatus when we can fetch", async () => { 12 12 const fn = mock(() => {}); 13 13 14 14 mock.module("./alerting.ts", () => { 15 15 return { 16 - updateMonitorStatus: fn, 16 + upsertMonitorStatus: fn, 17 17 }; 18 18 }); 19 19 await checkerRetryPolicy({ ··· 28 28 expect(fn).toHaveBeenCalledTimes(1); 29 29 }); 30 30 31 - test("should call updateMonitorStatus when status error", async () => { 31 + test("should call upsertMonitorStatus when status error", async () => { 32 32 const fn = mock(() => {}); 33 33 34 34 mock.module("./alerting.ts", () => { 35 35 return { 36 - updateMonitorStatus: fn, 36 + upsertMonitorStatus: fn, 37 37 }; 38 38 }); 39 39 try { ··· 57 57 58 58 mock.module("./alerting.ts", () => { 59 59 return { 60 - updateMonitorStatus: fn, 60 + upsertMonitorStatus: fn, 61 61 }; 62 62 }); 63 63 try { ··· 83 83 84 84 mock.module("./alerting.ts", () => { 85 85 return { 86 - updateMonitorStatus: fn, 86 + upsertMonitorStatus: fn, 87 87 triggerAlerting: fn1, 88 88 }; 89 89 }); ··· 117 117 118 118 mock.module("./alerting.ts", () => { 119 119 return { 120 - updateMonitorStatus: fn, 120 + upsertMonitorStatus: fn, 121 121 triggerAlerting: fn1, 122 122 }; 123 123 });