mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Update dependencies
This commit is contained in:
@@ -265,7 +265,7 @@ describe('A SparqlDataAccessor', (): void => {
|
||||
fetchError = 'error';
|
||||
await expect(accessor.getMetadata({ path: 'http://identifier' })).rejects.toBe(fetchError);
|
||||
|
||||
fetchError = new Error();
|
||||
fetchError = new Error('read error');
|
||||
await expect(accessor.getMetadata({ path: 'http://identifier' })).rejects.toThrow(fetchError);
|
||||
|
||||
fetchError = undefined;
|
||||
@@ -278,7 +278,7 @@ describe('A SparqlDataAccessor', (): void => {
|
||||
updateError = 'error';
|
||||
await expect(accessor.writeContainer(identifier, metadata)).rejects.toBe(updateError);
|
||||
|
||||
updateError = new Error();
|
||||
updateError = new Error('write error');
|
||||
await expect(accessor.writeContainer(identifier, metadata)).rejects.toThrow(updateError);
|
||||
|
||||
updateError = undefined;
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('An ErrorToQuadConverter', (): void => {
|
||||
});
|
||||
|
||||
it('does not support multiple errors.', async(): Promise<void> => {
|
||||
const representation = new BasicRepresentation([ new Error(), new Error() ], 'internal/error', false);
|
||||
const representation = new BasicRepresentation([ new Error('a'), new Error('b') ], 'internal/error', false);
|
||||
const prom = converter.handle({ identifier, representation, preferences });
|
||||
await expect(prom).rejects.toThrow('Only single errors are supported.');
|
||||
await expect(prom).rejects.toThrow(InternalServerError);
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('An ErrorToTemplateConverter', (): void => {
|
||||
});
|
||||
|
||||
it('does not support multiple errors.', async(): Promise<void> => {
|
||||
const representation = new BasicRepresentation([ new Error(), new Error() ], 'internal/error', false);
|
||||
const representation = new BasicRepresentation([ new Error('a'), new Error('b') ], 'internal/error', false);
|
||||
const prom = converter.handle({ identifier, representation, preferences });
|
||||
await expect(prom).rejects.toThrow('Only single errors are supported.');
|
||||
await expect(prom).rejects.toThrow(InternalServerError);
|
||||
|
||||
@@ -105,10 +105,10 @@ describe('A SparqlUpdatePatchHandler', (): void => {
|
||||
|
||||
it('handles INSERT DATA updates.', async(): Promise<void> => {
|
||||
await handle(fulfilledDataInsert);
|
||||
expect(await basicChecks(startQuads.concat(
|
||||
[ quad(namedNode('http://test.com/s1'), namedNode('http://test.com/p1'), namedNode('http://test.com/o1')),
|
||||
quad(namedNode('http://test.com/s2'), namedNode('http://test.com/p2'), namedNode('http://test.com/o2')) ],
|
||||
))).toBe(true);
|
||||
expect(await basicChecks([ ...startQuads,
|
||||
quad(namedNode('http://test.com/s1'), namedNode('http://test.com/p1'), namedNode('http://test.com/o1')),
|
||||
quad(namedNode('http://test.com/s2'), namedNode('http://test.com/p2'), namedNode('http://test.com/o2')),
|
||||
])).toBe(true);
|
||||
});
|
||||
|
||||
it('handles DELETE DATA updates.', async(): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user