Vitest unit test configs completed. All tests pass

This commit is contained in:
Bahadir Sofuoglu 2022-09-14 16:17:12 +03:00
parent cb3e230f5f
commit eb2de5460c
33 changed files with 116 additions and 66 deletions

View file

@ -1,5 +1,5 @@
import { mount } from '@vue/test-utils';
import PrimeVue from '@/components/config/PrimeVue';
import PrimeVue from '../config/PrimeVue';
import ContextMenu from './ContextMenu.vue';
describe('ContextMenu.vue', () => {
@ -147,7 +147,7 @@ describe('ContextMenu.vue', () => {
it('should exist', async () => {
const event = { pageX: 100, pageY: 120, preventDefault: () => {}, stopPropagation: () => {} };
const show = jest.spyOn(wrapper.vm, 'show');
const show = vi.spyOn(wrapper.vm, 'show');
wrapper.vm.show(event);
await wrapper.setData({ visible: true });
@ -159,7 +159,7 @@ describe('ContextMenu.vue', () => {
});
it('should hide menu', async () => {
const hide = jest.spyOn(wrapper.vm, 'hide');
const hide = vi.spyOn(wrapper.vm, 'hide');
await wrapper.setData({ visible: true });