Skip to content

Commit

Permalink
fix: correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielforster committed Oct 3, 2023
1 parent d52e83d commit 582d20e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/lambda/formatters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' } })
})

Expand Down

0 comments on commit 582d20e

Please sign in to comment.