From d2d008b7927c1c7ed2b132d4febc4cf1b5e7c92e Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Fri, 17 May 2024 11:08:24 +0200 Subject: [PATCH] Adapt unit tests to use pinia --- client/src/components/FilesDialog/FilesDialog.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/components/FilesDialog/FilesDialog.test.ts b/client/src/components/FilesDialog/FilesDialog.test.ts index adee6564cbfe..d826f977a5aa 100644 --- a/client/src/components/FilesDialog/FilesDialog.test.ts +++ b/client/src/components/FilesDialog/FilesDialog.test.ts @@ -1,3 +1,4 @@ +import { createTestingPinia } from "@pinia/testing"; import { mount, Wrapper } from "@vue/test-utils"; import flushPromises from "flush-promises"; import { getLocalVue } from "tests/jest/helpers"; @@ -98,9 +99,11 @@ const initComponent = async (props: { multiple: boolean; mode?: string }) => { mockFetcher.path("/api/remote_files/plugins").method("get").mock({ data: rootResponse }); mockFetcher.path("/api/remote_files").method("get").mock(getMockedBrowseResponse); + const testingPinia = createTestingPinia({ stubActions: false }); const wrapper = mount(FilesDialog, { localVue, propsData: { ...props, modalStatic: true }, + pinia: testingPinia, }); await flushPromises();