b275f8697d
* test: [wip] add tests for rendererChildren * chore: use serializeInner for clearer output * fix: should remove the text node if content is empty * test: also test for appended content * test: inserting & removing * test: moving children * refactor: use a helper function * test: finish tests * test: duplicate keys tests belong to keyed children block * fix(runtime-test): fix insert when moving node in the same parent * fix: fix failing test cases for rendererChildren * test: handle rendererChildren edge case |
||
---|---|---|
.. | ||
__tests__ | ||
src | ||
api-extractor.json | ||
index.js | ||
package.json | ||
README.md |
@vue/runtime-test
import {
h,
render,
Component,
nodeOps,
startRecordingOps,
dumpOps
} from '@vue/runtime-test'
class App extends Component {
data () {
return {
msg: 'Hello World!'
}
}
render () {
return h('div', this.msg)
}
}
// root is of type `TestElement` as defined in src/nodeOps.ts
const root = nodeOps.createElement('div')
startRecordingOps()
render(h(App), root)
const ops = dumpOps()
console.log(ops)