Skip to content

Instantly share code, notes, and snippets.

@dennisja
Last active November 18, 2018 16:14
Show Gist options
  • Select an option

  • Save dennisja/4724ebe04c047f79eaed9693c25a2e1f to your computer and use it in GitHub Desktop.

Select an option

Save dennisja/4724ebe04c047f79eaed9693c25a2e1f to your computer and use it in GitHub Desktop.
import { render } from 'react-testing-library';
import { ApolloProvider } from 'react-apollo';
import client from './apolloClient';
describe("UserList component", () => {
it("should render the list of users", () => {
// try rendering the UserList component in an ApolloProvider
const { getByText } = render(
<ApolloProvider client={client}>
<UsersList />
</ApolloProvider>
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment