/*
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.
*/

/* eslint-disable */
import React from 'react';
import { mount } from 'enzyme';
import ThemeProvider from '../theme-provider.js';
import styled from '../styled.js';
import { withStyletronProvider } from '../../test/test-utils.js';
jest.unmock('../styled.js');
test('<ThemeProvider />', function () {
  var StyledMockButton = styled('button', function (_ref) {
    var theme = _ref.theme;
    return {
      backgroundColor: 'red'
    };
  });
  var TestComponent = withStyletronProvider(function () {
    return React.createElement(ThemeProvider, {
      theme: "red"
    }, React.createElement(StyledMockButton, {
      id: "testButton"
    }));
  });
  var wrapper = mount(React.createElement(TestComponent, null));
  var button = wrapper.find('#testButton').children().at(0);
  expect(button.props().$theme).toBe('red');
  wrapper.unmount();
});