import { Localized } from "content-src/aboutwelcome/components/MSLocalized"; import React from "react"; import { shallow } from "enzyme"; describe("", () => { it("should render span with no children", () => { const shallowWrapper = shallow(); assert.ok(shallowWrapper.find("span").exists()); assert.equal(shallowWrapper.text(), "test"); }); it("should render span when using string_id with no children", () => { const shallowWrapper = shallow( ); assert.ok(shallowWrapper.find("span[data-l10n-id='test_id']").exists()); }); it("should render text inside child", () => { const shallowWrapper = shallow(
); assert.ok(shallowWrapper.find("div").text(), "test"); }); it("should use l10n id on child", () => { const shallowWrapper = shallow(
); assert.ok(shallowWrapper.find("div[data-l10n-id='test_id']").exists()); }); it("should keep original children", () => { const shallowWrapper = shallow(

); assert.ok(shallowWrapper.find("span[data-l10n-name='test']").exists()); }); });