mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
Fix lint errors
This commit is contained in:
@@ -17,16 +17,20 @@ describe('API app', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await apiApp['api/bank-sync']({ accountId: 'account1' });
|
await apiApp['api/bank-sync']({ accountId: 'account1' });
|
||||||
expect(mainApp.runHandler).toHaveBeenCalledWith('accounts-bank-sync', {
|
expect(mainApp.runHandler.bind(mainApp)).toHaveBeenCalledWith(
|
||||||
ids: ['account1'],
|
'accounts-bank-sync',
|
||||||
});
|
{
|
||||||
|
ids: ['account1'],
|
||||||
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error when bank sync fails', async () => {
|
it('should throw an error when bank sync fails', async () => {
|
||||||
vi.spyOn(mainApp, 'runHandler').mockImplementation(
|
vi.spyOn(mainApp, 'runHandler').mockImplementation(
|
||||||
async (name: string) => {
|
async (name: string) => {
|
||||||
if (name === 'accounts-bank-sync')
|
if (name === 'accounts-bank-sync') {
|
||||||
return { errors: [{ message: 'connection-failed' }] };
|
return { errors: [{ message: 'connection-failed' }] };
|
||||||
|
}
|
||||||
throw new Error(`Unexpected handler: ${name}`);
|
throw new Error(`Unexpected handler: ${name}`);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user