(multiValueHeaders = {})
| 123 | }) |
| 124 | |
| 125 | function getReqRes (multiValueHeaders = {}) { |
| 126 | const event = { |
| 127 | resource: '/', |
| 128 | path: '/foo', |
| 129 | httpMethod: 'GET', |
| 130 | body: 'Hello serverless!', |
| 131 | multiValueHeaders, |
| 132 | requestContext: { |
| 133 | identity: { |
| 134 | sourceIp: '132.33.134.75' |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | const requestValues = apiGatewayEventSource.getRequest({ event }) |
| 139 | const requestResponse = serverlessExpressTransport.getRequestResponse(requestValues) |
| 140 | |
| 141 | return requestResponse |
| 142 | } |
| 143 | |
| 144 | test('getRequestResponse: with headers', async () => { |
| 145 | const { request } = await getReqRes({ 'x-foo': ['foo'] }) |
no outgoing calls
no test coverage detected
searching dependent graphs…