Skip to content

Commit

Permalink
Remove UNNEEDED_FRAME from useQuery tests.
Browse files Browse the repository at this point in the history
Final cleanup to address #9508.
  • Loading branch information
benjamn committed Apr 14, 2022
1 parent 2101a72 commit e94b545
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/react/hooks/__tests__/useQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ describe('useQuery Hook', () => {
expect(actualPartialFrames).toEqual(expectedPartialFrames);
};

const UNNEEDED_FRAME = {};

it("useQuery produces the expected frames initially", async () => {
const query = gql`{ hello }`;
const mocks = [ {
Expand All @@ -98,7 +96,8 @@ describe('useQuery Hook', () => {
expectFrames(result, [
{ loading: true, data: void 0 },
{ loading: false, data: { hello: "world" } },
UNNEEDED_FRAME
// Repeat frame because rerender forces useQuery to be called again
{ loading: false, data: { hello: "world" } },
]);
});

Expand Down Expand Up @@ -126,7 +125,6 @@ describe('useQuery Hook', () => {
expectFrames(result, [
{ loading: true, data: void 0, networkStatus: NetworkStatus.loading },
{ loading: false, data: { hello: "world 1" }, networkStatus: NetworkStatus.ready },
// UNNEEDED_FRAME,
{ loading: true, data: void 0, networkStatus: NetworkStatus.setVariables },
{ loading: false, data: { hello: "world 2" }, networkStatus: NetworkStatus.ready },
]);
Expand Down

0 comments on commit e94b545

Please sign in to comment.