Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 2dc7273

Browse files
committed
test(props): Add another test to ensure style is set properly using an object and a string.
#26
1 parent f211c3d commit 2dc7273

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unit/props.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ describe('props', () => {
3636
ReactDOM.render(<Comp test="test" />, window.fixture);
3737
});
3838

39-
it('should set style as an attribute', () => {
39+
it('should set style as an attribute (object)', () => {
4040
const Comp = createComponent('style', elem => expect(elem.style.display).to.equal('block'));
4141
ReactDOM.render(<Comp style={{ display: 'block' }} />, window.fixture);
4242
});
4343

44+
it('should set style as an attribute (string)', () => {
45+
const Comp = createComponent('style', elem => expect(elem.style.display).to.equal('block'));
46+
ReactDOM.render(<Comp style="style: block" />, window.fixture);
47+
});
48+
4449
it('should set properties for anything else', () => {
4550
const Comp = createComponent('test', (elem, value) => expect(value).to.equal('test'));
4651
ReactDOM.render(<Comp test="test" />, window.fixture);

0 commit comments

Comments
 (0)