mirror of
https://github.com/oxynote/oxynote.git
synced 2026-10-17 10:59:20 +02:00
fix web tests
This commit is contained in:
parent
7467e1eca2
commit
39a89232fa
|
|
@ -23,6 +23,17 @@ import {
|
|||
} from "~/composables/api/test-helpers"
|
||||
import { emitFrom, renderedIconNames } from "~/components/test-helpers"
|
||||
|
||||
// echarts measures text on a canvas, which happy-dom does not implement
|
||||
vi.mock("./visualizations/LineChart.vue", () => ({
|
||||
default: { name: "LineChart", render: () => null },
|
||||
}))
|
||||
vi.mock("./visualizations/BarChart.vue", () => ({
|
||||
default: { name: "BarChart", render: () => null },
|
||||
}))
|
||||
vi.mock("./visualizations/GaugeChart.vue", () => ({
|
||||
default: { name: "GaugeChart", render: () => null },
|
||||
}))
|
||||
|
||||
const DOCUMENT_ID = makeXid("doc")
|
||||
const BRANCH_ID = makeXid("branch")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { enableAutoUnmount } from "@vue/test-utils"
|
||||
import { afterEach, beforeEach, describe, it } from "vitest"
|
||||
import { afterEach, beforeEach, describe, it, vi } from "vitest"
|
||||
import BaseModal from "./BaseModal.client.vue"
|
||||
import ConfigSidebar from "./ConfigSidebar.vue"
|
||||
import VisualizationContainer from "../VisualizationContainer.vue"
|
||||
|
|
@ -26,6 +26,17 @@ import {
|
|||
} from "~/components/test-helpers"
|
||||
import { DiffStatus } from "~/components/editor/diff/position-map"
|
||||
|
||||
// echarts measures text on a canvas, which happy-dom does not implement
|
||||
vi.mock("../visualizations/LineChart.vue", () => ({
|
||||
default: { name: "LineChart", render: () => null },
|
||||
}))
|
||||
vi.mock("../visualizations/BarChart.vue", () => ({
|
||||
default: { name: "BarChart", render: () => null },
|
||||
}))
|
||||
vi.mock("../visualizations/GaugeChart.vue", () => ({
|
||||
default: { name: "GaugeChart", render: () => null },
|
||||
}))
|
||||
|
||||
const DOCUMENT_ID = makeXid("doc")
|
||||
const BRANCH_ID = makeXid("branch")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user