From c72d287827f20b9c1dd9f567a5504423c532d667 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Wed, 10 Jan 2024 21:53:21 +0400 Subject: [PATCH] Update tests --- packages/http-cors/__tests__/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/http-cors/__tests__/index.js b/packages/http-cors/__tests__/index.js index cdc5273d1..c94d3d534 100644 --- a/packages/http-cors/__tests__/index.js +++ b/packages/http-cors/__tests__/index.js @@ -819,15 +819,11 @@ test('it should set Vary header if present in config', async (t) => { }) }) -test('it should throw when not a http event', async (t) => { +test('it should not throw when not a http event', async (t) => { const handler = middy((event, context) => {}) handler.use(cors()) const event = {} - try { - await handler(event, context) - } catch (e) { - t.is(e.message, 'Unknown http event format') - } + t.notThrows(async () => await handler(event, context)) })