From 582d20e23a5612b38eeae0ea2d13552a5f73610e Mon Sep 17 00:00:00 2001 From: Gabriel Rocha Date: Tue, 3 Oct 2023 11:50:52 -0300 Subject: [PATCH] fix: correct test --- __tests__/lambda/formatters.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/lambda/formatters.test.ts b/__tests__/lambda/formatters.test.ts index 634235b..09fc18b 100644 --- a/__tests__/lambda/formatters.test.ts +++ b/__tests__/lambda/formatters.test.ts @@ -11,14 +11,14 @@ describe('invoke', () => { it('Should returns response formatted with headers', () => { expect(formattedResponse({ StatusCode: 200, - Payload: '{"headers":"{\\"total-count\\":\\"20\\"}"}' + Payload: '{"headers": {"total-count":"20"}}' })).toEqual({ headers: { 'total-count': '20' }, status: 200, body: {} }) }) it('Should returns response formatted with headers and body', () => { expect(formattedResponse({ StatusCode: 200, - Payload: '{"headers": "{\\"total-count\\":\\"20\\"}","body": "{\\"name\\":\\"John Doe\\"}"}' + Payload: '{"headers": {"total-count":"20"},"body": "{\\"name\\":\\"John Doe\\"}"}' })).toEqual({ headers: { 'total-count': '20' }, status: 200, body: { name: 'John Doe' } }) })