Skip to content

Commit b7d31cc

Browse files
committed
additional test
1 parent 125b180 commit b7d31cc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/components/themr.spec.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,22 @@ describe('Themr decorator function', () => {
390390
bar: 'bar'
391391
}
392392
const key = 'Foo'
393+
393394
@themr(key, foo)
394-
class Foo {}
395+
class Foo extends Component {
396+
render() {
397+
return <Passthrough {...this.props} />
398+
}
399+
}
395400
const Bar = themr(key, bar)(Foo)
396401
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+
})
397410
})
398411
})

0 commit comments

Comments
 (0)