From 1d0ded6e529b1aa46870e1c24d3435efe07ab339 Mon Sep 17 00:00:00 2001 From: AJaccP <112334043+AJaccP@users.noreply.github.com> Date: Thu, 4 Jul 2024 22:15:59 +0530 Subject: [PATCH] Fix reviews service test bug (#22) * Fix reviews service tests bug * Linting --- .../services/reviews-service.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/challenges-platform/services/reviews-service.test.ts b/test/challenges-platform/services/reviews-service.test.ts index f891820..0a169c1 100644 --- a/test/challenges-platform/services/reviews-service.test.ts +++ b/test/challenges-platform/services/reviews-service.test.ts @@ -66,21 +66,21 @@ describe("ReviewsService", () => { }); describe("when review does not exist", () => { it("returns an error", async () => { - const invalidUuid = "invalid-uuid"; - const result = await ReviewsService.findByUuid(invalidUuid); + const testUuid = uuid.create(); + const result = await ReviewsService.findByUuid(testUuid); expect(result.err).toBe(true); - expect(result.val.toString()).toBe("Error: Invalid UUID"); + expect(result.val.toString()).toBe("Error: Review not found"); }); }); describe("when uuid is invalid", () => { it("returns an error", async () => { - const testUuid = uuid.create(); - const result = await ReviewsService.findByUuid(testUuid); + const invalidUuid = "invalid-uuid"; + const result = await ReviewsService.findByUuid(invalidUuid); expect(result.err).toBe(true); - expect(result.val.toString()).toBe("Error: Review not found"); + expect(result.val.toString()).toBe("Error: Invalid UUID"); }); }); });