Skip to content

Commit 20a7afa

Browse files
committed
lint fix
1 parent 7325fa5 commit 20a7afa

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import MiNotFoundError from "@internal/datastore/src/errors/mi-not-found-error";
12
import { IncomingMI } from "../../contracts/mi";
23
import { getMI, postMI } from "../mi-operations";
3-
import MiNotFoundError from "@internal/datastore/src/errors/mi-not-found-error";
4-
54

65
describe("postMI function", () => {
76
const incomingMi: IncomingMI = {
@@ -41,7 +40,6 @@ describe("postMI function", () => {
4140
});
4241

4342
describe("getMI function", () => {
44-
it("retrieves the MI from the repository", async () => {
4543
const incomingMi: IncomingMI = {
4644
lineItem: "envelope-business-standard",
4745
timestamp: "2023-11-17T14:27:51.413Z",
@@ -51,6 +49,7 @@ describe("getMI function", () => {
5149
stockRemaining: 20_000,
5250
supplierId: "supplier1",
5351
};
52+
it("retrieves the MI from the repository", async () => {
5453
const persistedMi = { id: "id1", ...incomingMi };
5554

5655
const mockRepo = {
@@ -82,18 +81,18 @@ describe("getMI function", () => {
8281
.mockRejectedValue(new MiNotFoundError("supplier1", "miId1")),
8382
};
8483

85-
await expect(
86-
getMI("miId1", "supplier1", mockRepo as any),
87-
).rejects.toThrow("No resource found with that ID");
84+
await expect(getMI("miId1", "supplier1", mockRepo as any)).rejects.toThrow(
85+
"No resource found with that ID",
86+
);
8887
});
8988

9089
it("should throw unexpected error", async () => {
9190
const mockRepo = {
9291
getMI: jest.fn().mockRejectedValue(new Error("unexpected error")),
9392
};
9493

95-
await expect(
96-
getMI("miId1", "supplier1", mockRepo as any),
97-
).rejects.toThrow("unexpected error");
94+
await expect(getMI("miId1", "supplier1", mockRepo as any)).rejects.toThrow(
95+
"unexpected error",
96+
);
9897
});
9998
});

0 commit comments

Comments
 (0)