Skip to content

Commit 5cc8f8f

Browse files
ci: apply automated fixes
1 parent 41adbf5 commit 5cc8f8f

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

src/adapter/aws-lambda/conninfo.test.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,22 @@ describe('getConnInfo', () => {
8282
xff: '127.0.0.1, 192.168.1.100',
8383
expected: '192.168.1.100',
8484
},
85-
])(
86-
'Should return the last IP from x-forwarded-for ($description)',
87-
({ xff, expected }) => {
88-
const req = new Request('http://localhost/', {
89-
headers: { 'x-forwarded-for': xff },
90-
})
91-
const c = new Context(req, {
92-
env: {
93-
requestContext: {
94-
elb: {
95-
targetGroupArn: 'arn:aws:elasticloadbalancing:...',
96-
},
85+
])('Should return the last IP from x-forwarded-for ($description)', ({ xff, expected }) => {
86+
const req = new Request('http://localhost/', {
87+
headers: { 'x-forwarded-for': xff },
88+
})
89+
const c = new Context(req, {
90+
env: {
91+
requestContext: {
92+
elb: {
93+
targetGroupArn: 'arn:aws:elasticloadbalancing:...',
9794
},
9895
},
99-
})
100-
const info = getConnInfo(c)
101-
expect(info.remote.address).toBe(expected)
102-
}
103-
)
96+
},
97+
})
98+
const info = getConnInfo(c)
99+
expect(info.remote.address).toBe(expected)
100+
})
104101

105102
it('Should return undefined when no x-forwarded-for header', () => {
106103
const c = new Context(new Request('http://localhost/'), {

0 commit comments

Comments
 (0)