tor-browser

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

components_application_panel-App.test.js (812B)


      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 // Import & init localization
     11 const FluentReact = require("resource://devtools/client/shared/vendor/fluent-react.js");
     12 const LocalizationProvider = createFactory(FluentReact.LocalizationProvider);
     13 
     14 // Import component
     15 const App = createFactory(
     16  require("resource://devtools/client/application/src/components/App.js")
     17 );
     18 
     19 describe("App", () => {
     20  it("renders the expected snapshot", () => {
     21    const wrapper = shallow(
     22      LocalizationProvider({ bundles: [] }, App({}))
     23    ).dive(); // dive to bypass the LocalizationProvider wrapper
     24    expect(wrapper).toMatchSnapshot();
     25  });
     26 });