TheHeaderDropdownAccnt.spec.js 820 B

123456789101112131415161718192021222324
  1. import Vue from 'vue'
  2. import CoreuiVue from '@coreui/vue'
  3. import TheHeaderDropdownAccnt from '@/containers/TheHeaderDropdownAccnt'
  4. import { shallowMount } from '@vue/test-utils';
  5. Vue.use(CoreuiVue)
  6. describe('TheHeaderDropdownAccnt.vue', () => {
  7. it('has a name', () => {
  8. expect(TheHeaderDropdownAccnt.name).toBe('TheHeaderDropdownAccnt')
  9. })
  10. it('has a created hook', () => {
  11. expect(typeof TheHeaderDropdownAccnt.data).toMatch('function')
  12. })
  13. it('sets the correct default data', () => {
  14. expect(typeof TheHeaderDropdownAccnt.data).toMatch('function')
  15. const defaultData = TheHeaderDropdownAccnt.data()
  16. expect(defaultData.itemsCount).toBe(42)
  17. })
  18. test('renders correctly', () => {
  19. const wrapper = shallowMount(TheHeaderDropdownAccnt)
  20. expect(wrapper.element).toMatchSnapshot()
  21. })
  22. })