mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-03 19:54:04 +00:00
22 lines
426 B
JavaScript
22 lines
426 B
JavaScript
import { config } from "@vue/test-utils";
|
|
import { vi } from "vitest";
|
|
|
|
// Setup global mocks
|
|
vi.mock("vue-i18n", () => ({
|
|
useI18n: () => ({
|
|
t: (key) => key,
|
|
}),
|
|
}));
|
|
|
|
// Global components mock
|
|
config.global.stubs = {
|
|
"font-awesome-icon": true,
|
|
};
|
|
|
|
// Global mounting options
|
|
config.global.mocks = {
|
|
$t: (key) => key,
|
|
$filters: {
|
|
formatDateTime: vi.fn((date) => date.toString()),
|
|
},
|
|
};
|