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:
@@ -485,7 +485,7 @@ describe('A FileDataAccessor', (): void => {
|
||||
});
|
||||
|
||||
it('can delete the root container.', async(): Promise<void> => {
|
||||
cache.data = { };
|
||||
cache.data = {};
|
||||
await expect(accessor.deleteResource({ path: `${base}` })).resolves.toBeUndefined();
|
||||
expect(cache.data).toBeUndefined();
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ function simplifyQuery(query: string | string[]): string {
|
||||
if (Array.isArray(query)) {
|
||||
query = query.join(' ');
|
||||
}
|
||||
return query.replace(/\n/gu, ' ').trim();
|
||||
return query.replaceAll('\n', ' ').trim();
|
||||
}
|
||||
|
||||
describe('A SparqlDataAccessor', (): void => {
|
||||
|
||||
@@ -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> => {
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('An RdfPatcher,', (): void => {
|
||||
};
|
||||
patcher.handle.mockImplementation(
|
||||
async(input: RepresentationPatcherInput<RdfDatasetRepresentation>):
|
||||
Promise<RdfDatasetRepresentation> => Promise.resolve(input.representation!),
|
||||
Promise<RdfDatasetRepresentation> => input.representation!,
|
||||
);
|
||||
|
||||
rdfPatcher = new RdfPatcher(patcher);
|
||||
|
||||
Reference in New Issue
Block a user