vue3-core/packages/runtime-test
三咲智子 Kevin Deng bfe6b459d3
style: update format & lint config (#9162)
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
..
__tests__ style: update format & lint config (#9162) 2023-12-26 19:39:47 +08:00
src style: update format & lint config (#9162) 2023-12-26 19:39:47 +08:00
LICENSE chore: license 2019-10-28 11:15:17 -04:00
README.md build: adjust build formats 2020-04-19 18:43:21 -04:00
index.js refactor: rename packages 2018-10-26 15:44:50 -04:00
package.json chore: exclude private packages from version updates 2023-11-21 09:37:37 +08:00

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)