From c535c6f456413642465a1542032ffc6980febe20 Mon Sep 17 00:00:00 2001 From: Yair Dovrat Date: Fri, 26 Jan 2024 15:06:37 +0100 Subject: [PATCH] fix tests2 --- src/index.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.test.ts b/src/index.test.ts index 8528e9d..9356720 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -78,6 +78,10 @@ describe('Pinterest MC sends correct request', () => { }) it('Handler invokes fetch correctly', () => { - expect(() => handler(mockEvent, settings, mockEvent.payload.event)).not.toThrow() + const arr = [] + handler(mockEvent, settings,'pageview', (...args) => { + arr.push(args) + }) + expect(arr.length).toBe(1) }) })