Skip to content

Commit

Permalink
fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
antriksh-9 authored Mar 19, 2024
1 parent b23f621 commit 79c1ff0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/resolvers/Mutation/createOrganization.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 79c1ff0

Please sign in to comment.