Skip to content

Commit 823f4b3

Browse files
committed
Include ALB events in mockServer
1 parent 537eb7e commit 823f4b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/__tests__/mockServer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { IncomingMessage, Server, ServerResponse } from 'http';
22
import type {
3+
ALBResult,
34
APIGatewayProxyEvent,
5+
APIGatewayProxyEventV2,
46
APIGatewayProxyResult,
57
APIGatewayProxyStructuredResultV2,
68
Context as LambdaContext,
@@ -14,7 +16,9 @@ type LambdaHandler<T = IncomingEvent> = Handler<
1416
T,
1517
T extends APIGatewayProxyEvent
1618
? APIGatewayProxyResult
17-
: APIGatewayProxyStructuredResultV2
19+
: T extends APIGatewayProxyEventV2
20+
? APIGatewayProxyStructuredResultV2
21+
: ALBResult
1822
>;
1923

2024
// Returns a Node http handler that invokes a Lambda handler (v1 / v2)

0 commit comments

Comments
 (0)