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

@@ -41,7 +41,7 @@ describe('A SimpleBodyparser', (): void => {
it('returns a stream of quads if there was data.', async(): Promise<void> => {
const input = streamifyArray([ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ]) as HttpRequest;
input.headers = { 'content-type': 'text/turtle' };
const result = await bodyParser.handle(input);
const result = (await bodyParser.handle(input))!;
expect(result).toEqual({
data: expect.any(Readable),
dataType: 'quad',
@@ -61,7 +61,7 @@ describe('A SimpleBodyparser', (): void => {
it('throws an UnsupportedHttpError on invalid triple data when reading the stream.', async(): Promise<void> => {
const input = streamifyArray([ '<http://test.com/s> <http://test.com/p> <http://test.com/o>' ]) as HttpRequest;
input.headers = { 'content-type': 'text/turtle' };
const result = await bodyParser.handle(input);
const result = (await bodyParser.handle(input))!;
await expect(arrayifyStream(result.data)).rejects.toThrow(UnsupportedHttpError);
});
});