refactor: Bring lint config back to original strictness

This commit is contained in:
Joachim Van Herwegen
2023-10-30 14:32:21 +01:00
parent 7a007dc466
commit 3bb3004abb
52 changed files with 239 additions and 132 deletions

View File

@@ -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);
});

View File

@@ -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');

View File

@@ -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> => {