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,18 +1,27 @@
import { config, mount } from '@vue/test-utils';
import BlockUI from './BlockUI.vue';
import Panel from '@/components/panel/Panel.vue';
import Button from '@/components/button/Button.vue';
import Panel from '../panel/Panel.vue';
import Button from '../button/Button.vue';
config.global.mocks = {
$primevue: {
config: {
zIndex: {
modal: 1100
}
}
},
},
DomHandler: {
addClass: vi.fn(),
removeClass: vi.fn(),
},
ZIndexUtils: {
set: vi.fn(),
clear: vi.fn(),
},
}
};
describe('BlockUI.vue', () => {
it('should blocked and unblocked the panel', async () => {
const wrapper = mount({