My code is failing when i run this test. I have tried
await expect(API().isFileAvailable).rejects.toEqual(Promise.reject(new Error('Bad input')));
But this doesn't work
File: async (a: string, b: string | undefined, c: string | undefined) => {
if (!a&& !b) {
return Promise.reject(new Error('Bad input'));
}
}