Skip to content

Commit 05ef502

Browse files
committed
coverage for nested SVG vnode namespace
1 parent 45a489b commit 05ef502

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unit/modules/vdom/create-element.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ describe('create-element', () => {
143143
const vm = new Vue({})
144144
const h = bind(createElement, vm)
145145
renderState.activeInstance = vm
146-
const vnode = h('svg', [h('a')])
146+
const vnode = h('svg', [h('a', [h('foo', [h('bar')])])])
147147
expect(vnode.ns).toBe('svg')
148-
// should apply ns to children
148+
// should apply ns to children recursively
149149
expect(vnode.children[0].ns).toBe('svg')
150+
expect(vnode.children[0].children[0].ns).toBe('svg')
151+
expect(vnode.children[0].children[0].children[0].ns).toBe('svg')
150152
})
151153

152154
it('render MathML elements with correct namespace', () => {

0 commit comments

Comments
 (0)