vue3-yuanma/packages/renderer-test
2018-10-02 14:00:29 -04:00
..
__tests__ fix(test-renderer): indent on multiple children 2018-10-01 17:50:02 -04:00
src refactor: remove replaceChild from nodeOps 2018-10-02 14:00:29 -04:00
.npmignore feat: implement basic test renderer 2018-10-01 13:15:07 -04:00
index.js feat: implement basic test renderer 2018-10-01 13:15:07 -04:00
package.json feat: implement basic test renderer 2018-10-01 13:15:07 -04:00
README.md feat: implement basic test renderer 2018-10-01 13:15:07 -04:00

@vue/renderer-test

import {
  h,
  render,
  Component,
  nodeOps,
  startRecordingOps,
  dumpOps
} from '@vue/renderer-test'

class App extends Component {
  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')

startRecordingOps()

render(h(App), root)

const ops = dumpOps()

console.log(ops)