We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 125b180 commit b7d31ccCopy full SHA for b7d31cc
test/components/themr.spec.js
@@ -390,9 +390,22 @@ describe('Themr decorator function', () => {
390
bar: 'bar'
391
}
392
const key = 'Foo'
393
+
394
@themr(key, foo)
- class Foo {}
395
+ class Foo extends Component {
396
+ render() {
397
+ return <Passthrough {...this.props} />
398
+ }
399
400
const Bar = themr(key, bar)(Foo)
401
expect(Bar).toBe(Foo)
402
403
+ const tree = TestUtils.renderIntoDocument(<Bar/>)
404
405
+ const stub = TestUtils.findRenderedComponentWithType(tree, Passthrough)
406
+ expect(stub.props.theme).toEqual({
407
+ ...foo,
408
+ ...bar
409
+ })
410
})
411
0 commit comments