Sha256: 780728801081034a401cfc9c78b22a5285728207be2d4541876bbabb2d458d3c
Contents?: true
Size: 540 Bytes
Versions: 4
Compression:
Stored size: 540 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
4 entries across 4 versions & 1 rubygems