|
|
@@ -40,7 +40,7 @@ function shuffle(array: Array<any>) {
|
|
|
return array
|
|
|
}
|
|
|
|
|
|
-it('should patch previously empty children', () => {
|
|
|
+test('should patch previously empty children', () => {
|
|
|
const root = nodeOps.createElement('div')
|
|
|
|
|
|
render(h('div', []), root)
|
|
|
@@ -50,7 +50,7 @@ it('should patch previously empty children', () => {
|
|
|
expect(inner(root)).toBe('<div>hello</div>')
|
|
|
})
|
|
|
|
|
|
-it('should patch previously null children', () => {
|
|
|
+test('should patch previously null children', () => {
|
|
|
const root = nodeOps.createElement('div')
|
|
|
|
|
|
render(h('div'), root)
|
|
|
@@ -60,6 +60,15 @@ it('should patch previously null children', () => {
|
|
|
expect(inner(root)).toBe('<div>hello</div>')
|
|
|
})
|
|
|
|
|
|
+test('array children -> text children', () => {
|
|
|
+ const root = nodeOps.createElement('div')
|
|
|
+ render(h('div', [h('div')]), root)
|
|
|
+ expect(inner(root)).toBe('<div><div></div></div>')
|
|
|
+
|
|
|
+ render(h('div', 'hello'), root)
|
|
|
+ expect(inner(root)).toBe('<div>hello</div>')
|
|
|
+})
|
|
|
+
|
|
|
describe('renderer: keyed children', () => {
|
|
|
let root: TestElement
|
|
|
let elm: TestElement
|