Skip to content

Commit

Permalink
Merge pull request #652 from braddunbar/h-component-test
Browse files Browse the repository at this point in the history
Add test for rendering a component with text nodes
  • Loading branch information
robertknight committed May 21, 2017
2 parents 5d6a2c4 + 02f98c5 commit 465dacb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/shared/h.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,13 @@ describe('h(jsx)', () => {
.with.property('children')
.that.deep.equals(['onetwothree']);
});

it('should not merge children of components', () => {
let Component = ({children}) => children;
let r = h(Component, null, 'x', 'y');

expect(r).to.be.an('object')
.with.property('children')
.that.deep.equals(['x', 'y']);
});
});

0 comments on commit 465dacb

Please sign in to comment.