Skip to content

Commit

Permalink
code comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
thwalker6 committed Jan 10, 2025
1 parent 18ee359 commit 48ed216
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/lambda/update/updatePackage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ describe("handler", () => {
expect(result).toStrictEqual(expectedResult);
});

it("should return 400 if package ID or action is not found", async () => {
it("should return 400 if package ID is not found", async () => {
const noActionevent = {
body: JSON.stringify({ packageId: "123", changeReason: "Nunya" }),
} as APIGatewayEvent;

const resultPackage = await handler(noActionevent);

expect(resultPackage.statusCode).toBe(400);
});
it("should return 400 if action is not found", async () => {
const noApackageEvent = {
body: JSON.stringify({ action: "123", changeReason: "Nunya" }),
} as APIGatewayEvent;
Expand All @@ -43,7 +45,6 @@ describe("handler", () => {

expect(resultAction.statusCode).toBe(400);
});

it("should get a package", async () => {
const noActionevent = {
body: JSON.stringify({ packageId: "123", action: "delete", changeReason: "Nunya" }),
Expand Down

0 comments on commit 48ed216

Please sign in to comment.