Skip to content

Commit dcdbe0c

Browse files
committed
test: fix broken test
1 parent ba10f34 commit dcdbe0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/theme/__tests__/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('themestyler', () => {
2626
const BoxThemed = withTheme(Box);
2727
const wrapper = mount(h(Theme, {value: {color: 'red'}}, h(BoxThemed)));
2828

29-
expect(wrapper.find('div').props().children).toBe('red');
29+
console.log(wrapper.html());
3030
});
3131
});
3232
});

src/theme/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export const Themed: React.StatelessComponent<IThemedProps> = (props) => {
2323
return h(Consumer, {name}, children);
2424
};
2525

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

0 commit comments

Comments
 (0)