Skip to content

Commit

Permalink
use itAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
brainkim committed Aug 16, 2021
1 parent d33132e commit 7712bfa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/react/components/__tests__/client/Mutation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import { ApolloClient } from '../../../../core';
import { ApolloError } from '../../../../errors';
import { DataProxy, InMemoryCache as Cache } from '../../../../cache';
import { ApolloProvider } from '../../../context';
import { MockedProvider, MockLink, mockSingleLink } from '../../../../testing';
import {
itAsync,
MockedProvider,
MockLink,
mockSingleLink,
} from '../../../../testing';
import { Query } from '../../Query';
import { Mutation } from '../../Mutation';

Expand Down Expand Up @@ -156,7 +161,7 @@ describe('General Mutation testing', () => {
expect(spy).toHaveBeenCalledWith(mocksProps[1].result);
});

it('performs a mutation', () => new Promise((resolve, reject) => {
itAsync('performs a mutation', (resolve, reject) => {
let count = 0;
const Component = () => (
<Mutation mutation={mutation}>
Expand Down Expand Up @@ -190,7 +195,7 @@ describe('General Mutation testing', () => {
);

wait().then(resolve, reject);
}));
});

it('can bind only the mutation and not rerender by props', done => {
let count = 0;
Expand Down

0 comments on commit 7712bfa

Please sign in to comment.