Nuxt/examples/jest-vtu-example/pages/index.spec.js
Paul Gascou-Vaillancourt 5c0d12fb13 chore(examples): Add Jest + Vue Test Utils example (#4116)
* chore(examples): Add Jest + Vue Test Utils example

* style: Lint

* refactor: Rename button component & fix lint errors

* refactor: Use export default

* refactor: Babel 7 setup
2018-10-25 19:42:21 +02:00

15 lines
359 B
JavaScript

import { shallowMount } from '@vue/test-utils'
import index from './index'
describe('index', () => {
test('mounts properly', () => {
const wrapper = shallowMount(index)
expect(wrapper.isVueInstance()).toBeTruthy()
})
test('renders properly', () => {
const wrapper = shallowMount(index)
expect(wrapper.html()).toMatchSnapshot()
})
})