mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

In case a stream the request is being piped into closes, we don't want to close the request since it shares a socket with the response.
11 lines
359 B
TypeScript
11 lines
359 B
TypeScript
import { isHttpRequest } from '../../../src/server/HttpRequest';
|
|
|
|
describe('HttpRequest', (): void => {
|
|
describe('#isHttpRequest', (): void => {
|
|
it('can identify HttpRequests.', async(): Promise<void> => {
|
|
expect(isHttpRequest({})).toBe(false);
|
|
expect(isHttpRequest({ socket: {}, method: 'GET', url: '/url' })).toBe(true);
|
|
});
|
|
});
|
|
});
|