mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Set max-len to 120
This commit is contained in:
@@ -25,7 +25,9 @@ describe('AcceptParser', (): void => {
|
||||
});
|
||||
|
||||
it('parses complex Accept headers.', async(): Promise<void> => {
|
||||
expect(parseAccept('text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4,text/x-dvi; q=0.8; mxb=100000; mxt')).toEqual([
|
||||
expect(parseAccept(
|
||||
'text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4,text/x-dvi; q=0.8; mxb=100000; mxt',
|
||||
)).toEqual([
|
||||
{ range: 'text/html', weight: 1, parameters: { mediaType: { level: '1' }, extension: {}}},
|
||||
{ range: 'text/x-dvi', weight: 0.8, parameters: { mediaType: {}, extension: { mxb: '100000', mxt: '' }}},
|
||||
{ range: 'text/html', weight: 0.7, parameters: { mediaType: {}, extension: {}}},
|
||||
@@ -35,7 +37,9 @@ describe('AcceptParser', (): void => {
|
||||
|
||||
it('parses Accept headers with double quoted values.', async(): Promise<void> => {
|
||||
expect(parseAccept('audio/basic; param1="val" ; q=0.5 ;param2="\\\\\\"valid"')).toEqual([
|
||||
{ range: 'audio/basic', weight: 0.5, parameters: { mediaType: { param1: '"val"' }, extension: { param2: '"\\\\\\"valid"' }}},
|
||||
{ range: 'audio/basic',
|
||||
weight: 0.5,
|
||||
parameters: { mediaType: { param1: '"val"' }, extension: { param2: '"\\\\\\"valid"' }}},
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('A CompositeAsyncHandler', (): void => {
|
||||
expect(handleFn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('throws the same error as canHandle when calling handleSafe if no handler supports the data.', async(): Promise<void> => {
|
||||
it('throws the canHandle error when calling handleSafe if the data is not supported.', async(): Promise<void> => {
|
||||
const handler = new CompositeAsyncHandler([ handlerFalse, handlerFalse ]);
|
||||
|
||||
await expect(handler.handleSafe(null)).rejects.toThrow('[Not supported., Not supported.]');
|
||||
|
||||
Reference in New Issue
Block a user