Skip to content

Instantly share code, notes, and snippets.

@tomitrescak
Last active February 23, 2017 11:32
Show Gist options
  • Save tomitrescak/4498ae313c94e9a97403fafa0717d9c9 to your computer and use it in GitHub Desktop.
Save tomitrescak/4498ae313c94e9a97403fafa0717d9c9 to your computer and use it in GitHub Desktop.
describe('User', () => {
describe('Profile', () => {
decorator((story) => (
<ContextProvider>
{ story() }
</ContextProvider>
));
story('Default', () => {
const user = new ClientUser();
const view = <ProfileView user={user} />;
const context = {
state: { accounts: { userId: '1' }},
};
tests(() => {
const wrapper = mount(view, { context } );
it('Renders correctly', function () {
expect(wrapper).toMatchSnapshot();
});
it('Changes Avatar', () => {
// Other test
});
});
return view;
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment