Skip to content

Commit 72103f0

Browse files
committed
Renaming
1 parent 5dfbfa1 commit 72103f0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/eventToRequestOptions.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import eventToRequestOptions from '../src/eventToRequestOptions';
22

3-
import event from './fixtures/event.json';
3+
import eventRestApi from './fixtures/event-rest-api.json';
44
import eventHealth from './fixtures/health-event.json';
55
import eventAlb from './fixtures/alb-event.json';
66
import evenMultiHeadertAlb from './fixtures/alb-multi-header-event.json';
77

88
describe('eventToRequestOptions', () => {
99
it('converts Api Gateway event to RequestOptions object', () => {
10-
const reqOpts = eventToRequestOptions(event);
10+
const reqOpts = eventToRequestOptions(eventRestApi);
1111
expect(reqOpts).toEqual({
1212
"method": "GET",
1313
"path": "/inspect?param=ab%20cd",
@@ -83,7 +83,7 @@ describe('eventToRequestOptions', () => {
8383
})
8484

8585
it('sets x-aws-lambda-request-id header with context request id', () => {
86-
const reqOpts = eventToRequestOptions(event, {awsRequestId: 'req-id'});
86+
const reqOpts = eventToRequestOptions(eventRestApi, {awsRequestId: 'req-id'});
8787
expect(reqOpts.headers!['x-aws-lambda-request-id']).toEqual('req-id');
8888
});
8989

File renamed without changes.

test/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import zlib from 'zlib';
22
import app from './app';
33
import lambda from '../src/lambda';
44

5-
import event from './fixtures/event.json';
5+
import eventRestApi from './fixtures/event-rest-api.json';
66
import eventHttpApi from './fixtures/event-http-api.json';
77
import eventHttpApiV1 from './fixtures/event-http-api-1.0.json';
88
import eventHttpApiV2 from './fixtures/event-http-api-2.0.json';
@@ -97,7 +97,7 @@ describe('integration', () => {
9797
});
9898

9999
it('handles API GW event', async () => {
100-
const response = await handler(event)
100+
const response = await handler(eventRestApi)
101101
expect(response.statusCode).toEqual(200);
102102
expect(response.isBase64Encoded).toEqual(false);
103103
expect(response.multiValueHeaders!["content-type"][0]).toEqual('application/json; charset=utf-8');

0 commit comments

Comments
 (0)