fix: Enable strict TypeScript settings

This commit is contained in:
Joachim Van Herwegen
2020-07-24 09:27:44 +02:00
parent 4001050588
commit dcff424f58
28 changed files with 115 additions and 105 deletions

View File

@@ -16,6 +16,10 @@ describe('A SimplePostOperationHandler', (): void => {
await expect(handler.canHandle({ method: 'POST' } as Operation)).rejects.toThrow(UnsupportedHttpError);
});
it('errors if no body is present.', async(): Promise<void> => {
await expect(handler.handle({ method: 'POST' } as Operation)).rejects.toThrow(UnsupportedHttpError);
});
it('adds the given representation to the store and returns the new identifier.', async(): Promise<void> => {
await expect(handler.handle({ method: 'POST', body: { dataType: 'test' }} as Operation)).resolves.toEqual({ identifier: { path: 'newPath' }});
});