mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Bring lint config back to original strictness
This commit is contained in:
@@ -29,7 +29,7 @@ describe('A BaseTypedRepresentationConverter', (): void => {
|
||||
});
|
||||
|
||||
it('can not handle input without a Content-Type.', async(): Promise<void> => {
|
||||
const args: RepresentationConverterArgs = { representation: { metadata: { }}, preferences: {}} as any;
|
||||
const args: RepresentationConverterArgs = { representation: { metadata: {}}, preferences: {}} as any;
|
||||
const converter = new CustomTypedRepresentationConverter('*/*', 'b/b');
|
||||
await expect(converter.canHandle(args)).rejects.toThrow(NotImplementedHttpError);
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('A ChainedConverter', (): void => {
|
||||
|
||||
it('needs at least 1 converter.', async(): Promise<void> => {
|
||||
expect((): any => new ChainedConverter([])).toThrow('At least 1 converter is required.');
|
||||
expect(new ChainedConverter([ new DummyConverter({ }, { }) ])).toBeInstanceOf(ChainedConverter);
|
||||
expect(new ChainedConverter([ new DummyConverter({}, {}) ])).toBeInstanceOf(ChainedConverter);
|
||||
});
|
||||
|
||||
it('errors if there are no content-type or preferences.', async(): Promise<void> => {
|
||||
@@ -106,7 +106,7 @@ describe('A ChainedConverter', (): void => {
|
||||
expect(result.metadata.contentType).toBe('b/b');
|
||||
expect(result.metadata.get(POSIX.terms.size)?.value).toBe('500');
|
||||
|
||||
args.preferences.type = { };
|
||||
args.preferences.type = {};
|
||||
result = await converter.handle(args);
|
||||
expect(result.metadata.contentType).toBe('b/b');
|
||||
expect(result.metadata.get(POSIX.terms.size)?.value).toBe('500');
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('A RdfToQuadConverter', (): void => {
|
||||
});
|
||||
|
||||
it('may not handle application/json to quad conversion.', async(): Promise<void> => {
|
||||
await expect(converter.getOutputTypes('application/json')).resolves.toEqual({ });
|
||||
await expect(converter.getOutputTypes('application/json')).resolves.toEqual({});
|
||||
});
|
||||
|
||||
it('can handle turtle to quad conversions.', async(): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user