|
|
преди 2 години | |
|---|---|---|
| .. | ||
| __tests__ | bfe6b459d3 style: update format & lint config (#9162) | преди 2 години |
| src | bfe6b459d3 style: update format & lint config (#9162) | преди 2 години |
| LICENSE | 34989ef7fe chore: license | преди 6 години |
| README.md | 218e6e1667 build: adjust build formats | преди 6 години |
| index.js | e05673f4d3 refactor: rename packages | преди 7 години |
| package.json | fc772dbf73 chore: exclude private packages from version updates | преди 2 години |
This is for Vue's own internal tests only - it ensures logic tested using this package is DOM-agnostic, and it runs faster than JSDOM.
It can also be used as a reference for implementing a custom renderer.
import { h, render, nodeOps, dumpOps } from '@vue/runtime-test'
const App = {
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')
render(h(App), root)
const ops = dumpOps()
console.log(ops)