mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
fix multiple view test error using pinia
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { createPinia } from "pinia";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import flushPromises from "flush-promises";
|
||||
import { getLocalVue } from "jest/helpers";
|
||||
@@ -10,6 +11,8 @@ const COUNT = 8;
|
||||
const USER_ID = "test-user-id";
|
||||
const CURRENT_HISTORY_ID = "test-history-id-0";
|
||||
|
||||
const pinia = createPinia();
|
||||
|
||||
const getFakeHistorySummaries = (num, selectedIndex = 0) => {
|
||||
const result = Array.from({ length: num }, (_, index) => ({
|
||||
id: `test-history-id-${index}`,
|
||||
@@ -32,6 +35,7 @@ describe("MultipleView", () => {
|
||||
beforeEach(async () => {
|
||||
wrapper = mount(MultipleView, {
|
||||
store,
|
||||
pinia,
|
||||
stubs: {
|
||||
CurrentUser: CurrentUserMock,
|
||||
UserHistories: UserHistoriesMock,
|
||||
|
||||
Reference in New Issue
Block a user