diff --git a/src/tests/push.test.ts b/src/tests/push.test.ts index 029e331..bf2845b 100644 --- a/src/tests/push.test.ts +++ b/src/tests/push.test.ts @@ -138,6 +138,15 @@ describe('sendNotification', () => { .mockResolvedValueOnce({}); await sendNotification('job-8', 'title', 'body'); - expect(mockWebPushSend).toHaveBeenCalledTimes(3); + const calledEndpoints = mockWebPushSend.mock.calls.map( + ([sub]) => (sub as { endpoint: string }).endpoint + ); + expect(calledEndpoints).toEqual( + expect.arrayContaining([ + 'https://fcm.example.com/push/ok1', + 'https://fcm.example.com/push/fail', + 'https://fcm.example.com/push/ok2' + ]) + ); }); });