mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Let Representations always have a body
This is relevant when the request has a content-type but no data.
This commit is contained in:
@@ -37,7 +37,7 @@ class DummyConverter extends TypedRepresentationConverter {
|
||||
const data = guardedStreamFrom([ 'dummy' ]);
|
||||
const metadata = new RepresentationMetadata(representation.metadata, 'x/x');
|
||||
|
||||
return { binary: true, data, metadata };
|
||||
return { binary: true, data, metadata, isEmpty: false };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('A BasicRequestParser with simple input parsers', (): void => {
|
||||
});
|
||||
expect(result.body?.metadata.contentType).toEqual('text/turtle');
|
||||
|
||||
await expect(arrayifyStream(result.body!.data)).resolves.toEqual(
|
||||
await expect(arrayifyStream(result.body.data)).resolves.toEqual(
|
||||
[ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ],
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user