Home

Awesome

snap-shot-vue-test

Jest + Vue.js testing snap-shot

Build status

See counter.test.js for example

import Vue from 'vue'
import Counter from './counter'
import snapshot from 'snap-shot'
// render function using vue-server-renderer
test('render counter', () => {
  const vm = new Vue({
    el: document.createElement('div'),
    render: h => h(Counter),
  })
  return snapshot(
    render(vm)
  )
})