Skip to content

Commit 83d5407

Browse files
committed
Missing test coverage
1 parent 4253abd commit 83d5407

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lambdas/api-handler/src/services/__tests__/letter-operations.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ describe("getLetterById", () => {
8080
await expect(getLetterById('supplierid', 'letter1', mockRepo as any)).rejects.toThrow('No resource found with that ID');
8181
});
8282

83+
it('should throw unexpected error', async () => {
84+
85+
const mockRepo = {
86+
getLetterById: jest.fn().mockRejectedValue(new Error('unexpected error'))
87+
};
88+
89+
await expect(getLetterById('supplierid', 'letter1', mockRepo as any)).rejects.toThrow("unexpected error");
90+
});
91+
8392
});
8493

8594
describe('patchLetterStatus function', () => {

0 commit comments

Comments
 (0)