fix: Set max-len to 120

This commit is contained in:
Joachim Van Herwegen
2020-07-24 14:59:41 +02:00
parent dcff424f58
commit aaba113563
23 changed files with 152 additions and 71 deletions

View File

@@ -11,12 +11,15 @@ describe('A SimpleSparqlUpdateBodyParser', (): void => {
it('only accepts application/sparql-update content.', async(): Promise<void> => {
await expect(bodyParser.canHandle({ headers: {}} as HttpRequest)).rejects.toThrow(UnsupportedMediaTypeHttpError);
await expect(bodyParser.canHandle({ headers: { 'content-type': 'text/plain' }} as HttpRequest)).rejects.toThrow(UnsupportedMediaTypeHttpError);
await expect(bodyParser.canHandle({ headers: { 'content-type': 'application/sparql-update' }} as HttpRequest)).resolves.toBeUndefined();
await expect(bodyParser.canHandle({ headers: { 'content-type': 'text/plain' }} as HttpRequest))
.rejects.toThrow(UnsupportedMediaTypeHttpError);
await expect(bodyParser.canHandle({ headers: { 'content-type': 'application/sparql-update' }} as HttpRequest))
.resolves.toBeUndefined();
});
it('errors when handling invalid SPARQL updates.', async(): Promise<void> => {
await expect(bodyParser.handle(streamifyArray([ 'VERY INVALID UPDATE' ]) as HttpRequest)).rejects.toThrow(UnsupportedHttpError);
await expect(bodyParser.handle(streamifyArray([ 'VERY INVALID UPDATE' ]) as HttpRequest))
.rejects.toThrow(UnsupportedHttpError);
});
it('converts SPARQL updates to algebra.', async(): Promise<void> => {