|
|
6 ani în urmă | |
|---|---|---|
| .. | ||
| __tests__ | 2569890e31 refactor: move mockWarn utility to @vue/shared | 6 ani în urmă |
| src | 09b4202a22 refactor(reactivity): adjust APIs | 6 ani în urmă |
| LICENSE | 34989ef7fe chore: license | 6 ani în urmă |
| README.md | 218e6e1667 build: adjust build formats | 6 ani în urmă |
| api-extractor.json | c9bf7ded2e refactor(types): mark internal API exports and exclude from d.ts | 6 ani în urmă |
| index.js | e05673f4d3 refactor: rename packages | 7 ani în urmă |
| package.json | a5bb1d02b7 release: v3.0.0-beta.5 | 6 ani în urmă |
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)