chore: Update eslint-plugin-jest dependency

This commit is contained in:
Joachim Van Herwegen
2024-07-18 08:36:05 +02:00
parent 86e8c09e2d
commit d1282f6b1a
15 changed files with 506 additions and 301 deletions

View File

@@ -489,7 +489,8 @@ describe('AppRunner', (): void => {
});
it('throws an error if creating a ComponentsManager fails.', async(): Promise<void> => {
(manager.configRegistry.register as jest.Mock).mockRejectedValueOnce(new Error('Fatal'));
// eslint-disable-next-line jest/unbound-method
jest.mocked(manager.configRegistry.register).mockRejectedValueOnce(new Error('Fatal'));
let caughtError: Error = new Error('should disappear');
try {
@@ -572,7 +573,8 @@ describe('AppRunner', (): void => {
});
it('throws an error if non-error objects get thrown.', async(): Promise<void> => {
(manager.configRegistry.register as jest.Mock).mockRejectedValueOnce('NotAnError');
// eslint-disable-next-line jest/unbound-method
jest.mocked(manager.configRegistry.register).mockRejectedValueOnce('NotAnError');
let caughtError: Error = new Error('should disappear');
try {