Skip to content

Commit

Permalink
test: adjust test to vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopf committed Aug 15, 2024
1 parent 98ef563 commit 846047c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { mount, VueWrapper } from '@vue/test-utils';
import { defineComponent, nextTick } from 'vue';
import { installNewXPlugin } from '../../../__tests__/utils';
import { XEvent } from '../../../wiring/events.types';
import BaseEventsModalClose from '../base-events-modal-close.vue';
import { XPlugin } from '../../../plugins/index';
import { defineComponent, nextTick } from 'vue';

/**
* Renders the {@link BaseEventsModalClose} with the provided options.
Expand All @@ -12,7 +12,7 @@ import { defineComponent, nextTick } from 'vue';
* @returns An small API to test the component.
*/
function renderBaseEventsModalClose({
template = '<BaseEventsModalClose v-bind="$attrs"/>',
template = '<BaseEventsModalClose :closingEvent="closingEvent"/>',
closingEvent
}: RenderBaseEventsModalCloseOptions = {}): RenderBaseEventsModalCloseAPI {
const modalComponent = defineComponent({
Expand All @@ -24,7 +24,6 @@ function renderBaseEventsModalClose({
type: String
}
},

template
});

Expand All @@ -35,7 +34,7 @@ function renderBaseEventsModalClose({
return {
wrapper: wrapper.findComponent(BaseEventsModalClose),
async click() {
wrapper.trigger('click');
await wrapper.trigger('click');
await nextTick();
}
};
Expand Down

0 comments on commit 846047c

Please sign in to comment.