blob: 1c845836f37f71da37da5c153ba5370f476e9dca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { expect } from 'chai';
import convert from '../vnode-children.js';
describe('experimental react children', () => {
it('has undefined as children for direct children', () => {
const [imgVNode] = convert('<img src="abc"></img>');
expect(imgVNode.props).to.deep.include({ children: undefined });
});
it('has undefined as children for nested children', () => {
const [divVNode] = convert('<div><img src="xyz"></img></div>');
const [imgVNode] = divVNode.props.children;
expect(imgVNode.props).to.deep.include({ children: undefined });
});
});
|