HelloWorld.spec.js 365 B

123456789101112
  1. import Vue from 'vue'
  2. import HelloWorld from '@/components/HelloWorld'
  3. describe('HelloWorld.vue', () => {
  4. it('should render correct contents', () => {
  5. const Constructor = Vue.extend(HelloWorld)
  6. const vm = new Constructor().$mount()
  7. expect(vm.$el.querySelector('.hello h1').textContent)
  8. .toEqual('Welcome to Your Vue.js App')
  9. })
  10. })