refactor: Use declarations style for functions.

This commit is contained in:
Ruben Verborgh
2021-01-06 11:24:43 +01:00
parent e70e060225
commit f9a20799eb
23 changed files with 208 additions and 162 deletions

View File

@@ -65,7 +65,7 @@ describe('A SparqlUpdatePatchHandler', (): void => {
handler = new SparqlUpdatePatchHandler(source, locker);
});
const basicChecks = async(quads: Quad[]): Promise<boolean> => {
async function basicChecks(quads: Quad[]): Promise<boolean> {
expect(source.getRepresentation).toHaveBeenCalledTimes(1);
expect(source.getRepresentation).toHaveBeenLastCalledWith(
{ path: 'path' }, { type: { [INTERNAL_QUADS]: 1 }},
@@ -81,7 +81,7 @@ describe('A SparqlUpdatePatchHandler', (): void => {
expect(setParams[1].metadata.contentType).toEqual(INTERNAL_QUADS);
await expect(arrayifyStream(setParams[1].data)).resolves.toBeRdfIsomorphic(quads);
return true;
};
}
it('only accepts SPARQL updates.', async(): Promise<void> => {
const input = { identifier: { path: 'path' },