refactor: Enable stricter test linting

This commit is contained in:
Joachim Van Herwegen
2023-10-27 15:53:52 +02:00
parent 6248ed0938
commit 7a007dc466
48 changed files with 179 additions and 155 deletions

View File

@@ -222,7 +222,8 @@ describe('A StaticAssetHandler', (): void => {
it('does not handle a request to a known folder URL with parent path segments.', async(): Promise<void> => {
const request = { method: 'GET', url: '/foo/bar/folder/../def.css' };
const response = createResponse({ eventEmitter: EventEmitter });
await expect(handler.canHandle({ request, response } as any)).rejects.toThrow();
await expect(handler.canHandle({ request, response } as any))
.rejects.toThrow('No static resource configured at /foo/bar/folder/../def.css');
});
it('caches responses when the expires option is set.', async(): Promise<void> => {