From 79c1ff0b2a1f26e497c94c111eaa24f837d41273 Mon Sep 17 00:00:00 2001 From: Antriksh Dangi <132576984+antriksh-9@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:55:09 +0530 Subject: [PATCH] fixing errors --- tests/resolvers/Mutation/createOrganization.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/resolvers/Mutation/createOrganization.spec.ts b/tests/resolvers/Mutation/createOrganization.spec.ts index 7d12e0fdd9..e6696ed961 100644 --- a/tests/resolvers/Mutation/createOrganization.spec.ts +++ b/tests/resolvers/Mutation/createOrganization.spec.ts @@ -442,11 +442,10 @@ describe("resolvers -> Mutation -> createOrganization", () => { expect(result).toEqual({ isAddressValid: false }); } catch (error) { // Validate that the error message matches the expected Address Validation Error message - expect((error as Error).message).toEqual("Not a Valid Address"); - - expect(error).toBeInstanceOf(Error); - - expect.fail("The error message does not match the expected message"); + if(error instanceof Error){ + expect(error.message).toEqual("Not a Valid Address"); + expect.fail("The error message does not match the expected message"); + } } } else { console.error(