mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Enable stricter test linting
This commit is contained in:
@@ -125,7 +125,7 @@ describe('A FileSystemResourceLocker', (): void => {
|
||||
it('stops proper-lock from throwing errors after finalize was called.', async(): Promise<void> => {
|
||||
// Tests should never access private fields so we need to change this after splitting the test as mentioned above.
|
||||
// Once we have a mock we can check which parameters `unlock` was called with and extract the function from there.
|
||||
expect((): void => (locker as any).customOnCompromised(new Error('test'))).toThrow();
|
||||
expect((): void => (locker as any).customOnCompromised(new Error('test'))).toThrow('test');
|
||||
await locker.finalize();
|
||||
expect((locker as any).customOnCompromised(new Error('test'))).toBeUndefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user