Skip to content

Commit

Permalink
Use stream assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Dec 5, 2024
1 parent 29343c1 commit 3c9ce67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/__tests__/ObservableQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3706,17 +3706,17 @@ 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: {
car: { __typename: "Car", id: 2, make: "Ford", model: "Bronco" },
},
});

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,
Expand All @@ -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" },
Expand Down

0 comments on commit 3c9ce67

Please sign in to comment.