diff --git a/src/__tests__/dataMasking.ts b/src/__tests__/dataMasking.ts index 1ae4a934554..94351af36e4 100644 --- a/src/__tests__/dataMasking.ts +++ b/src/__tests__/dataMasking.ts @@ -805,17 +805,22 @@ test("masks partial cache data when returnPartialData is `true`", async () => { link: new MockLink(mocks), }); - client.writeQuery({ - query, - data: { - currentUser: { - __typename: "User", - id: 1, - // @ts-expect-error TODO: Determine how to write this with masked types - age: 34, + { + // Silence warning about writing partial data + using _ = spyOnConsole("error"); + + client.writeQuery({ + query, + data: { + currentUser: { + __typename: "User", + id: 1, + // @ts-expect-error TODO: Determine how to write this with masked types + age: 34, + }, }, - }, - }); + }); + } const observable = client.watchQuery({ query,