"use strict";

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _index = require("../index.js");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
describe('StatefulPanel', function () {
  test('basic render', function () {
    function PanelContainer() {
      return _react.default.createElement("div", null);
    }

    var props = {
      overrides: {
        PanelContainer: PanelContainer
      },
      onChange: jest.fn(),
      stateReducer: jest.fn(),
      children: 'Content'
    };
    var component = (0, _enzyme.mount)(_react.default.createElement(_index.StatefulPanel, props));
    var renderedPanel = component.find(_index.Panel);
    expect(component.find(_index.StatefulPanelContainer).length).toBe(1);
    expect(renderedPanel.length).toBe(1);
    expect(renderedPanel.first().props().overrides).toEqual(props.overrides);
    expect(renderedPanel.first().props().children).toEqual(props.children);
  });
});