import "@testing-library/jest-dom"; import { afterEach, beforeAll } from "vitest"; import { cleanup } from "@testing-library/react"; import i18n from "i18next"; import { initReactI18next } from "react-i18next"; beforeAll(async () => { await i18n.use(initReactI18next).init({ lng: "zh", fallbackLng: "zh", resources: { zh: { translation: {} }, en: { translation: {} }, }, interpolation: { escapeValue: false, }, }); }); afterEach(() => { cleanup(); });