vitest.setup.ts 458 B

123456789101112
  1. // learn more: https://github.com/testing-library/jest-dom
  2. // eslint-disable-next-line import/no-extraneous-dependencies
  3. import "@testing-library/jest-dom";
  4. // @ts-expect-error - Mock for Terminal tests
  5. HTMLCanvasElement.prototype.getContext = vi.fn();
  6. // Mock the i18n provider
  7. vi.mock("react-i18next", async (importOriginal) => ({
  8. ...(await importOriginal<typeof import("react-i18next")>()),
  9. useTranslation: () => ({ t: (key: string) => key }),
  10. }));