fix: Remove duplicate checks

These were added when setting TypeScript settings to strict,
but should not be needed due to how AsyncHandlers should be used.
This commit is contained in:
Joachim Van Herwegen
2020-08-25 15:00:45 +02:00
parent bca4d06c9a
commit 4bc1dcdd1b
4 changed files with 2 additions and 16 deletions

View File

@@ -29,10 +29,6 @@ describe('A SimpleRequestParser', (): void => {
await expect(requestParser.canHandle({ url: 'url' } as any)).rejects.toThrow('Missing method.');
});
it('errors if called without method.', async(): Promise<void> => {
await expect(requestParser.handle({ url: 'url' } as any)).rejects.toThrow('Missing method.');
});
it('returns the output of all input parsers after calling handle.', async(): Promise<void> => {
await expect(requestParser.handle({ url: 'url', method: 'GET' } as any)).resolves.toEqual({
method: 'GET',

View File

@@ -18,10 +18,6 @@ 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' }});