mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Update eslint related dependencies
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AsyncHandler } from '../../../src/util/AsyncHandler';
|
||||
import type { AsyncHandler } from '../../../src/util/AsyncHandler';
|
||||
import { StaticAsyncHandler } from '../../util/StaticAsyncHandler';
|
||||
|
||||
describe('An AsyncHandler', (): void => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AsyncHandler } from '../../../src/util/AsyncHandler';
|
||||
import type { AsyncHandler } from '../../../src/util/AsyncHandler';
|
||||
import { CompositeAsyncHandler } from '../../../src/util/CompositeAsyncHandler';
|
||||
import { StaticAsyncHandler } from '../../util/StaticAsyncHandler';
|
||||
|
||||
@@ -45,6 +45,15 @@ describe('A CompositeAsyncHandler', (): void => {
|
||||
await expect(handler.canHandle(null)).rejects.toThrow('[Not supported., Not supported.]');
|
||||
});
|
||||
|
||||
it('throws unknown errors if no Error objects are thrown.', async(): Promise<void> => {
|
||||
handlerFalse.canHandle = async(): Promise<void> => {
|
||||
throw 'apple';
|
||||
};
|
||||
const handler = new CompositeAsyncHandler([ handlerFalse, handlerFalse ]);
|
||||
|
||||
await expect(handler.canHandle(null)).rejects.toThrow('[Unknown error., Unknown error.]');
|
||||
});
|
||||
|
||||
it('handles data if a handler supports it.', async(): Promise<void> => {
|
||||
const handler = new CompositeAsyncHandler([ handlerFalse, handlerTrue ]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user