Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cephalization committed Jan 11, 2025
1 parent d68f068 commit 623834e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/utils/__tests__/errorUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
describe("getErrorMessagesFromRelayMutationError", () => {
it("should extract error messages from a Relay mutation error", () => {
const error = new Error(
"Error fetching GraphQL query 'MutationName' with variables '{'input':{'var1': 'test'}': [{'message':'Actual Error Message','locations':[{'line':4,'column':3}],'path':['responsePath']}]"
`Error fetching GraphQL query "MutationName" with variables {"input":{"var1":"test"}: [{"message":"Actual Error Message 'with quotes'","locations":[{"line":4,"column":3}],"path":["responsePath"]}]`
);
const result = getErrorMessagesFromRelayMutationError(error);
expect(result).toEqual(["Actual Error Message"]);
expect(result).toEqual(["Actual Error Message 'with quotes'"]);
});

it("should return an empty array if no error messages are found", () => {
Expand Down

0 comments on commit 623834e

Please sign in to comment.