summaryrefslogtreecommitdiffstats
path: root/devtools/client/application/test/node/components/components_application_panel-App.test.js
blob: fb003be26e889616d6d8da998732b3cdf0e415fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Import libs
const { shallow } = require("enzyme");
const { createFactory } = require("react");

// Import & init localization
const FluentReact = require("resource://devtools/client/shared/vendor/fluent-react.js");
const LocalizationProvider = createFactory(FluentReact.LocalizationProvider);

// Import component
const App = createFactory(
  require("resource://devtools/client/application/src/components/App.js")
);

describe("App", () => {
  it("renders the expected snapshot", () => {
    const wrapper = shallow(
      LocalizationProvider({ bundles: [] }, App({}))
    ).dive(); // dive to bypass the LocalizationProvider wrapper
    expect(wrapper).toMatchSnapshot();
  });
});