Farmbot-Web-App/webpack/password_reset/__tests__/index_test.ts
2018-03-14 10:29:25 -05:00

21 lines
482 B
TypeScript

const mockFn = jest.fn();
jest.mock("../../i18n", () => {
return { detectLanguage: jest.fn(() => Promise.resolve(mockFn)) };
});
jest.mock("i18next", () => {
return { init: jest.fn() };
});
import { detectLanguage } from "../../i18n";
import * as I18n from "i18next";
describe("password reset index", () => {
it("loads the app", async () => {
await import("../index");
expect(detectLanguage).toHaveBeenCalled();
expect(I18n.init).toHaveBeenCalled();
});
});