mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: update eslint settings
This commit is contained in:
@@ -2,10 +2,10 @@ import { AsyncHandler } from '../../../src/util/AsyncHandler';
|
||||
import { StaticAsyncHandler } from '../../util/StaticAsyncHandler';
|
||||
|
||||
describe('An AsyncHandler', (): void => {
|
||||
it('calls canHandle and handle when handleSafe is called.', async (): Promise<void> => {
|
||||
it('calls canHandle and handle when handleSafe is called.', async(): Promise<void> => {
|
||||
const handlerTrue: AsyncHandler<any, any> = new StaticAsyncHandler(true, null);
|
||||
const canHandleFn = jest.fn(async (input: any): Promise<void> => input);
|
||||
const handleFn = jest.fn(async (input: any): Promise<any> => input);
|
||||
const canHandleFn = jest.fn(async(input: any): Promise<void> => input);
|
||||
const handleFn = jest.fn(async(input: any): Promise<any> => input);
|
||||
|
||||
handlerTrue.canHandle = canHandleFn;
|
||||
handlerTrue.handle = handleFn;
|
||||
@@ -14,12 +14,12 @@ describe('An AsyncHandler', (): void => {
|
||||
expect(handleFn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('does not call handle when canHandle errors during a handleSafe call.', async (): Promise<void> => {
|
||||
it('does not call handle when canHandle errors during a handleSafe call.', async(): Promise<void> => {
|
||||
const handlerFalse: AsyncHandler<any, any> = new StaticAsyncHandler(false, null);
|
||||
const canHandleFn = jest.fn(async (): Promise<void> => {
|
||||
const canHandleFn = jest.fn(async(): Promise<void> => {
|
||||
throw new Error('test');
|
||||
});
|
||||
const handleFn = jest.fn(async (input: any): Promise<any> => input);
|
||||
const handleFn = jest.fn(async(input: any): Promise<any> => input);
|
||||
|
||||
handlerFalse.canHandle = canHandleFn;
|
||||
handlerFalse.handle = handleFn;
|
||||
|
||||
Reference in New Issue
Block a user