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

Version Path
decidim-comments-0.23.6 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.5 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.4 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.3 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.2 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.1.rc1 app/frontend/application/application.component.test.tsx
decidim-comments-0.23.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.22.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.21.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.20.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.20.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.19.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.18.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.19.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.17.2 app/frontend/application/application.component.test.tsx
decidim-comments-0.18.0 app/frontend/application/application.component.test.tsx
decidim-comments-0.17.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.16.1 app/frontend/application/application.component.test.tsx
decidim-comments-0.17.0 app/frontend/application/application.component.test.tsx