Skip to content

Commit

Permalink
Adapt unit tests to use pinia
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed May 17, 2024
1 parent b614ee6 commit d2d008b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/components/FilesDialog/FilesDialog.test.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d2d008b

Please sign in to comment.