chore(server): eslint await-thenable (#7545)
* await-thenable * fix library watchers * moar eslint * fix test * fix typo * try to remove check void return * fix checksVoidReturn * move to domain utils * remove eslint ignores * chore: cleanup types * chore: use logger * fix: e2e --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
committed by
GitHub
parent
972d5a3411
commit
5d377e5b0f
@@ -3,7 +3,7 @@ import { WatchOptions } from 'chokidar';
|
||||
|
||||
interface MockWatcherOptions {
|
||||
items?: Array<{ event: 'change' | 'add' | 'unlink' | 'error'; value: string }>;
|
||||
close?: () => void;
|
||||
close?: () => Promise<void>;
|
||||
}
|
||||
|
||||
export const makeMockWatcher =
|
||||
@@ -29,7 +29,12 @@ export const makeMockWatcher =
|
||||
}
|
||||
}
|
||||
}
|
||||
return () => close?.();
|
||||
|
||||
if (close) {
|
||||
return () => close();
|
||||
}
|
||||
|
||||
return () => Promise.resolve();
|
||||
};
|
||||
|
||||
export const newStorageRepositoryMock = (reset = true): jest.Mocked<IStorageRepository> => {
|
||||
|
||||
Reference in New Issue
Block a user