Evan You ceace3a8cc release: v3.2.4 пре 4 година
..
__tests__ 5b3f1e8424 fix(runtime-core): patchChildren first in patchElement (#4313) пре 4 година
src 47f488350c chore: run updated prettier пре 4 година
LICENSE 34989ef7fe chore: license пре 6 година
README.md 218e6e1667 build: adjust build formats пре 6 година
api-extractor.json c9bf7ded2e refactor(types): mark internal API exports and exclude from d.ts пре 6 година
index.js e05673f4d3 refactor: rename packages пре 7 година
package.json ceace3a8cc release: v3.2.4 пре 4 година

README.md

@vue/runtime-test

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)