Skip to content

Commit b7ba6f7

Browse files
committed
Add socket remote address to mock request in auth tests
1 parent a876d58 commit b7ba6f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/middleware/auth.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function createMockRequest(authHeader?: string): Request {
1212
return {
1313
headers: authHeader ? { authorization: authHeader } : {},
1414
userId: undefined,
15+
socket: { remoteAddress: "127.0.0.1" },
1516
} as unknown as Request;
1617
}
1718

0 commit comments

Comments
 (0)