Skip to content

Commit 625b3c1

Browse files
committed
Fix test
1 parent 586c1fe commit 625b3c1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

test/eventToRequestOptions.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ describe('eventToRequestOptions', () => {
8282
})
8383
})
8484

85+
it('sets x-aws-lambda-request-id header with context request id', () => {
86+
const reqOpts = eventToRequestOptions(event, {awsRequestId: 'req-id'});
87+
expect(reqOpts.headers!['x-aws-lambda-request-id']).toEqual('req-id');
88+
});
89+
8590
describe('ALB', () => {
8691
it('sets remote ip address based on x-forwarded headers', () => {
8792
const reqOpts = eventToRequestOptions({

test/integration.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ describe('integration', () => {
195195
});
196196
});
197197

198-
it('sets x-aws-lambda-request-id header with context request id', () => {
199-
return handler(event, {awsRequestId: 'req-id'}).then(response => {
200-
expect(response.multiValueHeaders!['x-aws-lambda-request-id']).toEqual('req-id');
201-
});
202-
});
203-
204198
it('works with compressed response', () => {
205199
const myEvent = {
206200
path: "/static/big.html",

0 commit comments

Comments
 (0)