Files
manja_ui_dev/tests/unit/views/base/Switches.spec.js
T
2020-07-16 12:31:55 +02:00

28 lines
748 B
JavaScript

import Vue from 'vue'
import { mount, shallowMount } from '@vue/test-utils';
import CoreuiVue from '@coreui/vue'
import Switches from '@/views/base/Switches'
Vue.use(CoreuiVue)
describe('Switches.vue', () => {
it('has a name', () => {
expect(Switches.name).toBe('Switches')
})
it('has a created hook', () => {
expect(typeof Switches.data).toMatch('function')
})
it('is Vue instance', () => {
const wrapper = mount(Switches)
expect(wrapper.vm).toBeTruthy()
})
it('is Switches', () => {
const wrapper = mount(Switches)
expect(wrapper.findComponent(Switches)).toBeTruthy()
})
test('renders correctly', () => {
const wrapper = shallowMount(Switches)
expect(wrapper.element).toMatchSnapshot()
})
})