dev: Improve support for front end unit tests (#7163)

This commit is contained in:
miah
2026-05-31 10:41:52 -05:00
committed by GitHub
parent 7b0d1fde64
commit 364af97060
11 changed files with 719 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
import { config } from "@vue/test-utils";
import { createI18n } from "vue-i18n";
function loadEnLocales() {
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require("../lang/messages/en-US.json") as Record<string, string>;
}
const i18n = createI18n({
locale: "en-US",
messages: {
"en-US": loadEnLocales(),
},
});
config.global.plugins = [...(config.global.plugins ?? []), i18n];
export { i18n };