import { shallow } from "enzyme"; import * as React from "react"; import Application from "./application.component"; const { I18n } = require("react-i18nify"); describe("", () => { afterEach(() => { I18n.setLocale("en"); }); it("should set I18n locale to locale prop", () => { spyOn(I18n, "setLocale"); const locale = "ca"; shallow(
My application
, ); expect(I18n.setLocale).toHaveBeenCalledWith(locale); }); });