test: fix some tests

This commit is contained in:
Evan You
2018-11-08 12:54:11 -05:00
parent 157971b3cb
commit bd1b06f1cc
5 changed files with 25 additions and 43 deletions

View File

@@ -12,7 +12,8 @@ import {
nextTick,
resetOps,
dumpOps,
NodeOpTypes
NodeOpTypes,
renderInstance
} from '@vue/runtime-test'
describe('Fragments', () => {
@@ -23,7 +24,7 @@ describe('Fragments', () => {
}
}
const root = nodeOps.createElement('div')
await render(h(App), root)
await renderInstance(App)
expect(serialize(root)).toBe(`<div><div>one</div>two</div>`)
expect(root.children.length).toBe(2)
expect(root.children[0]).toMatchObject({