mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Enable strict TypeScript settings
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user