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:
@@ -28,7 +28,7 @@ describe('A PatchingStore', (): void => {
|
||||
});
|
||||
|
||||
it('calls its patcher if modifyResource is not implemented.', async(): Promise<void> => {
|
||||
source.modifyResource = jest.fn(async(): Promise<any> => {
|
||||
jest.spyOn(source, 'modifyResource').mockImplementation(async(): Promise<any> => {
|
||||
throw new NotImplementedHttpError();
|
||||
});
|
||||
await expect(store.modifyResource({ path: 'modifyPath' }, {} as Patch)).resolves.toBe('patcher');
|
||||
@@ -40,7 +40,7 @@ describe('A PatchingStore', (): void => {
|
||||
});
|
||||
|
||||
it('rethrows source modifyResource errors.', async(): Promise<void> => {
|
||||
source.modifyResource = jest.fn(async(): Promise<any> => {
|
||||
jest.spyOn(source, 'modifyResource').mockImplementation(async(): Promise<any> => {
|
||||
throw new Error('dummy');
|
||||
});
|
||||
await expect(store.modifyResource({ path: 'modifyPath' }, {} as Patch)).rejects.toThrow('dummy');
|
||||
|
||||
Reference in New Issue
Block a user