feat(global): initialize project and framework structure, dockerize
This commit is contained in:
22
app/components/PrimeButtonDemo.spec.ts
Normal file
22
app/components/PrimeButtonDemo.spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { nextTick } from 'vue';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import Button from 'primevue/button';
|
||||
import Dialog from 'primevue/dialog';
|
||||
import PrimeButtonDemo from './PrimeButtonDemo.vue';
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
it('opens dialog on click', async () => {
|
||||
const wrapper = mount(PrimeButtonDemo, {
|
||||
attachTo: document.body,
|
||||
global: {
|
||||
plugins: [PrimeVue],
|
||||
components: { Button, Dialog },
|
||||
},
|
||||
});
|
||||
|
||||
await wrapper.find('button').trigger('click');
|
||||
await nextTick();
|
||||
|
||||
expect(document.body.innerHTML).toContain('PrimeVue is working');
|
||||
});
|
||||
Reference in New Issue
Block a user