Skip to content

Commit e94517a

Browse files
committed
chore: don't shadow request
1 parent 14140a9 commit e94517a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/http-proxy-middleware.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ describe('E2E http-proxy-middleware', () => {
9696
)
9797
);
9898

99-
await mockTargetServer.post('/api').thenCallback((request) => {
100-
expect(request.body.text).toBe('foo=bar&bar=baz');
99+
await mockTargetServer.post('/api').thenCallback((req) => {
100+
expect(req.body.text).toBe('foo=bar&bar=baz');
101101
return { status: 200 };
102102
});
103103
await agent.post('/api').send('foo=bar').send('bar=baz').expect(200);
@@ -112,8 +112,8 @@ describe('E2E http-proxy-middleware', () => {
112112
)
113113
);
114114

115-
await mockTargetServer.post('/api').thenCallback((request) => {
116-
expect(request.body.json).toEqual({ foo: 'bar', bar: 'baz' });
115+
await mockTargetServer.post('/api').thenCallback((req) => {
116+
expect(req.body.json).toEqual({ foo: 'bar', bar: 'baz' });
117117
return { status: 200 };
118118
});
119119
await agent.post('/api').send({ foo: 'bar', bar: 'baz' }).expect(200);

0 commit comments

Comments
 (0)