Skip to content

Commit 41dbe10

Browse files
committed
add mi repository tests for exception
1 parent c3e3ef8 commit 41dbe10

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/datastore/src/__test__/mi-repository.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ describe("MiRepository", () => {
6666
});
6767

6868
describe("getMi", () => {
69+
it("throws an error when fetching MI information that does not exist", async() => {
70+
await expect(
71+
miRepository.getMI("XXX", "supplier1"),
72+
).rejects.toThrow(
73+
"Management Information with id XXX not found for supplier supplier1",
74+
);
75+
});
76+
6977
it("creates MI with id and timestamps", async () => {
7078
jest.useFakeTimers();
7179
// Month is zero-indexed in JS Date

0 commit comments

Comments
 (0)