Skip to content

Commit 558caf5

Browse files
committed
Added tests for the converter
1 parent 4f071ce commit 558caf5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/event-handler/tests/unit/rest/converters.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,18 @@ describe('Converters', () => {
396396
expect(result.statusCode).toBe(204);
397397
expect(result.body).toBe('');
398398
});
399+
400+
it('handles compressed response body', async () => {
401+
const response = new Response('Hello World', {
402+
status: 200,
403+
headers: {
404+
'content-encoding': 'gzip',
405+
},
406+
});
407+
408+
const result = await webResponseToProxyResult(response);
409+
expect(result.isBase64Encoded).toBe(true);
410+
});
399411
});
400412

401413
describe('handlerResultToProxyResult', () => {

0 commit comments

Comments
 (0)