tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

components_application_panel-ManifestItem.test.js (796B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Import libs
      7 const { shallow } = require("enzyme");
      8 const { createFactory } = require("react");
      9 
     10 const ManifestItem = createFactory(
     11  require("resource://devtools/client/application/src/components/manifest/ManifestItem.js")
     12 );
     13 
     14 /*
     15 * Unit tests for the ManifestItem component
     16 */
     17 
     18 describe("ManifestItem", () => {
     19  it("renders the expected snapshot for a populated item", () => {
     20    const wrapper = shallow(ManifestItem({ label: "foo" }, "bar"));
     21    expect(wrapper).toMatchSnapshot();
     22  });
     23 
     24  it("renders the expected snapshot for an empty item", () => {
     25    const wrapper = shallow(ManifestItem({ label: "foo" }));
     26    expect(wrapper).toMatchSnapshot();
     27  });
     28 });