From 3c9ce678365adfc5aacc3f26636f414845c42624 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Thu, 5 Dec 2024 10:10:32 -0700 Subject: [PATCH] Use stream assertions --- src/core/__tests__/ObservableQuery.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/__tests__/ObservableQuery.ts b/src/core/__tests__/ObservableQuery.ts index acb57833b5..7b923ed45e 100644 --- a/src/core/__tests__/ObservableQuery.ts +++ b/src/core/__tests__/ObservableQuery.ts @@ -3706,7 +3706,7 @@ test("does not return partial cache data when `returnPartialData` is false and n const stream = new ObservableStream(observable); - expect(await stream.takeNext()).toEqual({ + await expect(stream).toEmitValue({ loading: false, networkStatus: NetworkStatus.ready, data: { @@ -3714,9 +3714,9 @@ test("does not return partial cache data when `returnPartialData` is false and n }, }); - observable.reobserve({ variables: { id: 1 } }); + await observable.reobserve({ variables: { id: 1 } }); - expect(await stream.takeNext()).toEqual({ + await expect(stream).toEmitValue({ loading: true, networkStatus: NetworkStatus.setVariables, data: undefined, @@ -3728,7 +3728,7 @@ test("does not return partial cache data when `returnPartialData` is false and n data: undefined, }); - expect(await stream.takeNext()).toEqual({ + await expect(stream).toEmitValue({ loading: false, networkStatus: NetworkStatus.ready, data: { __typename: "Car", id: 1, make: "Ford", model: "Pinto" },