Skip to content

Commit 465dacb

Browse files
authored
Merge pull request preactjs#652 from braddunbar/h-component-test
Add test for rendering a component with text nodes
2 parents 5d6a2c4 + 02f98c5 commit 465dacb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/shared/h.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,13 @@ describe('h(jsx)', () => {
208208
.with.property('children')
209209
.that.deep.equals(['onetwothree']);
210210
});
211+
212+
it('should not merge children of components', () => {
213+
let Component = ({children}) => children;
214+
let r = h(Component, null, 'x', 'y');
215+
216+
expect(r).to.be.an('object')
217+
.with.property('children')
218+
.that.deep.equals(['x', 'y']);
219+
});
211220
});

0 commit comments

Comments
 (0)