feat(runtime-test): triggerEvent

This commit is contained in:
Evan You
2018-10-28 17:43:27 -04:00
parent 52e6964d6c
commit 665cd8e3d9
6 changed files with 58 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { TestElement, TestNode, NodeTypes, TestText } from './nodeOps'
import { isOn } from '@vue/shared'
export function serialize(
node: TestNode,
@@ -19,7 +20,7 @@ function serializeElement(
): string {
const props = Object.keys(node.props)
.map(key => {
return `${key}=${JSON.stringify(node.props[key])}`
return isOn(key) ? `` : `${key}=${JSON.stringify(node.props[key])}`
})
.join(' ')
const newLine = indent ? `\n` : ``