mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Ensure main handler ends
This commit is contained in:
committed by
Joachim Van Herwegen
parent
199d657097
commit
273626a799
@@ -77,6 +77,13 @@ describe('ExpressHttpServer', (): void => {
|
||||
});
|
||||
});
|
||||
|
||||
it('returns a 404 when the handler does not do anything.', async(): Promise<void> => {
|
||||
handler.handle = async(input): Promise<void> => {
|
||||
expect(input).toBeDefined();
|
||||
};
|
||||
await request(server).get('/').expect(404);
|
||||
});
|
||||
|
||||
it('catches errors thrown by its handler.', async(): Promise<void> => {
|
||||
handler.handle = async(): Promise<void> => {
|
||||
throw new Error('dummyError');
|
||||
|
||||
Reference in New Issue
Block a user