From 846047cd1387ed66b9da3004ea354a70de613c01 Mon Sep 17 00:00:00 2001 From: Diego Pascual Date: Thu, 15 Aug 2024 11:29:57 +0200 Subject: [PATCH] test: adjust test to vue 3 --- .../modals/__tests__/base-events-close-button.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/x-components/src/components/modals/__tests__/base-events-close-button.spec.ts b/packages/x-components/src/components/modals/__tests__/base-events-close-button.spec.ts index c9404f1f02..f53a9beebb 100644 --- a/packages/x-components/src/components/modals/__tests__/base-events-close-button.spec.ts +++ b/packages/x-components/src/components/modals/__tests__/base-events-close-button.spec.ts @@ -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. @@ -12,7 +12,7 @@ import { defineComponent, nextTick } from 'vue'; * @returns An small API to test the component. */ function renderBaseEventsModalClose({ - template = '', + template = '', closingEvent }: RenderBaseEventsModalCloseOptions = {}): RenderBaseEventsModalCloseAPI { const modalComponent = defineComponent({ @@ -24,7 +24,6 @@ function renderBaseEventsModalClose({ type: String } }, - template }); @@ -35,7 +34,7 @@ function renderBaseEventsModalClose({ return { wrapper: wrapper.findComponent(BaseEventsModalClose), async click() { - wrapper.trigger('click'); + await wrapper.trigger('click'); await nextTick(); } };