// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import "@testing-library/jest-dom"; jest.mock("react-i18next", () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: "en", changeLanguage: jest.fn() }, }), initReactI18next: { type: "3rdParty", init: jest.fn() }, })); jest.mock("react-router-dom", () => ({ ...jest.requireActual("react-router-dom"), useHistory: () => ({ push: jest.fn(), }), useLocation: () => ({ pathname: "/another-route", search: "", hash: "", state: null, key: "5nvxpbdafa", }), }));