test: test updates for d40c642
This commit is contained in:
@@ -29,15 +29,13 @@ describe('compiler: v-html transform', () => {
|
||||
it('should convert v-html to innerHTML', () => {
|
||||
const ast = transformWithVHtml(`<div v-html="test"/>`)
|
||||
expect((ast.children[0] as PlainElementNode).codegenNode).toMatchObject({
|
||||
arguments: [
|
||||
`"div"`,
|
||||
createObjectMatcher({
|
||||
innerHTML: `[test]`
|
||||
}),
|
||||
`null`,
|
||||
genFlagText(PatchFlags.PROPS),
|
||||
`["innerHTML"]`
|
||||
]
|
||||
tag: `"div"`,
|
||||
props: createObjectMatcher({
|
||||
innerHTML: `[test]`
|
||||
}),
|
||||
children: undefined,
|
||||
patchFlag: genFlagText(PatchFlags.PROPS),
|
||||
dynamicProps: `["innerHTML"]`
|
||||
})
|
||||
})
|
||||
|
||||
@@ -50,15 +48,13 @@ describe('compiler: v-html transform', () => {
|
||||
[{ code: DOMErrorCodes.X_V_HTML_WITH_CHILDREN }]
|
||||
])
|
||||
expect((ast.children[0] as PlainElementNode).codegenNode).toMatchObject({
|
||||
arguments: [
|
||||
`"div"`,
|
||||
createObjectMatcher({
|
||||
innerHTML: `[test]`
|
||||
}),
|
||||
`null`, // <-- children should have been removed
|
||||
genFlagText(PatchFlags.PROPS),
|
||||
`["innerHTML"]`
|
||||
]
|
||||
tag: `"div"`,
|
||||
props: createObjectMatcher({
|
||||
innerHTML: `[test]`
|
||||
}),
|
||||
children: undefined, // <-- children should have been removed
|
||||
patchFlag: genFlagText(PatchFlags.PROPS),
|
||||
dynamicProps: `["innerHTML"]`
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user