Evan You ec3c12ee10 release: v3.0.0-beta.16 5 tahun lalu
..
__tests__ 8084156f4d fix(runtime-core): mount children before setting element props 5 tahun lalu
src 80c868aefe workflow: setup eslint for prohibited syntax and globals 5 tahun lalu
LICENSE 34989ef7fe chore: license 6 tahun lalu
README.md 218e6e1667 build: adjust build formats 6 tahun lalu
api-extractor.json c9bf7ded2e refactor(types): mark internal API exports and exclude from d.ts 6 tahun lalu
index.js e05673f4d3 refactor: rename packages 7 tahun lalu
package.json ec3c12ee10 release: v3.0.0-beta.16 5 tahun lalu

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)