Skip to content

Commit

Permalink
test: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jan 29, 2018
1 parent ba10f34 commit dcdbe0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/theme/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('themestyler', () => {
const BoxThemed = withTheme(Box);
const wrapper = mount(h(Theme, {value: {color: 'red'}}, h(BoxThemed)));

expect(wrapper.find('div').props().children).toBe('red');
console.log(wrapper.html());
});
});
});
2 changes: 1 addition & 1 deletion src/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export const Themed: React.StatelessComponent<IThemedProps> = (props) => {
return h(Consumer, {name}, children);
};

export const withTheme: THoc<any, any> = (Comp, name = 'theme') => withContext(Comp, name);
export const withTheme: THoc<any, any> = (Comp, name = 'theme') => withContext(Comp, name, {name});

0 comments on commit dcdbe0c

Please sign in to comment.