From 11d5f9a342eae7a7dea93b7e5ae90a9eb72e19fc Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 16 Aug 2024 10:27:07 -0600 Subject: [PATCH] Fix issue with comparing errors in dataMasking --- src/__tests__/dataMasking.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/__tests__/dataMasking.ts b/src/__tests__/dataMasking.ts index 0349fc975b8..b114cad5c7d 100644 --- a/src/__tests__/dataMasking.ts +++ b/src/__tests__/dataMasking.ts @@ -1,8 +1,7 @@ -import { FragmentSpreadNode, GraphQLError, Kind, visit } from "graphql"; +import { FragmentSpreadNode, Kind, visit } from "graphql"; import { ApolloCache, ApolloClient, - ApolloError, Cache, DataProxy, DocumentTransform, @@ -888,7 +887,7 @@ test("masks partial data returned from data on errors with errorPolicy `all`", a age: 34, }, }, - errors: [new GraphQLError("Couldn't get name")], + errors: [{ message: "Couldn't get name" }], }, delay: 20, }, @@ -915,11 +914,7 @@ test("masks partial data returned from data on errors with errorPolicy `all`", a }, }); - expect(errors).toEqual([ - new ApolloError({ - graphQLErrors: [new GraphQLError("Couldn't get name")], - }), - ]); + expect(errors).toEqual([{ message: "Couldn't get name" }]); } });