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

Commit

Permalink
test(props): Add another test to ensure style is set properly using a…
Browse files Browse the repository at this point in the history
…n object and a string.

#26
  • Loading branch information
treshugart committed Jul 11, 2016
1 parent f211c3d commit 2dc7273
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/unit/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ describe('props', () => {
ReactDOM.render(<Comp test="test" />, window.fixture);
});

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

it('should set style as an attribute (string)', () => {
const Comp = createComponent('style', elem => expect(elem.style.display).to.equal('block'));
ReactDOM.render(<Comp style="style: block" />, window.fixture);
});

it('should set properties for anything else', () => {
const Comp = createComponent('test', (elem, value) => expect(value).to.equal('test'));
ReactDOM.render(<Comp test="test" />, window.fixture);
Expand Down

0 comments on commit 2dc7273

Please sign in to comment.