Sha256: 692bf0894f29fafc693a83baadbe409653a84132fc07131dc447ede0f1e05a46
Contents?: true
Size: 539 Bytes
Versions: 40
Compression:
Stored size: 539 Bytes
Contents
import { shallow } from "enzyme"; import * as React from "react"; import Application from "./application.component"; const { I18n } = require("react-i18nify"); describe("<Application />", () => { afterEach(() => { I18n.setLocale("en"); }); it("should set I18n locale to locale prop", () => { spyOn(I18n, "setLocale"); const locale = "ca"; shallow( <Application locale={locale}> <div>My application</div> </Application> ); expect(I18n.setLocale).toHaveBeenCalledWith(locale); }); });
Version data entries
40 entries across 40 versions & 1 rubygems