Skip to content

Instantly share code, notes, and snippets.

@ovidiuch
Last active December 21, 2017 11:43
Show Gist options
  • Save ovidiuch/271d8ec24b3df442b67c8b3af7ba53e1 to your computer and use it in GitHub Desktop.
Save ovidiuch/271d8ec24b3df442b67c8b3af7ba53e1 to your computer and use it in GitHub Desktop.
const { mount, getWrapper } = createTestContext({
fixture: {
component: Users,
fetch: [{
matcher: '/users',
response: ['Mary', 'Jason']
}]
}
});
beforeEach(mount);
test('renders list of users', async () => {
await until(() => getWrapper('.loading').length === 0);
expect(getWrapper('.users').text()).toContain('Mary');
expect(getWrapper('.users').text()).toContain('Jason');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment