mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Components.js supports Record now.
This commit is contained in:
@@ -3,16 +3,6 @@ import { HeaderHandler } from '../../../../src/server/middleware/HeaderHandler';
|
||||
import { guardStream } from '../../../../src/util/GuardedStream';
|
||||
|
||||
describe('a HeaderHandler', (): void => {
|
||||
it('adds no headers when none are configured.', async(): Promise<void> => {
|
||||
const handler = new HeaderHandler();
|
||||
|
||||
const request = guardStream(createRequest());
|
||||
const response = createResponse();
|
||||
await handler.handleSafe({ request, response });
|
||||
|
||||
expect(response.getHeaders()).toEqual({});
|
||||
});
|
||||
|
||||
it('adds all configured headers.', async(): Promise<void> => {
|
||||
const headers = { custom: 'Custom', other: 'Other' };
|
||||
const handler = new HeaderHandler(headers);
|
||||
|
||||
Reference in New Issue
Block a user