"use strict";

var _react = _interopRequireDefault(require("react"));
var _reactTestRenderer = _interopRequireDefault(require("react-test-renderer"));
var _themeContext = require("../src/theme-context");
var _box = _interopRequireDefault(require("../../components/atoms/box/box"));
var _index = require("../src/base/index");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
jest.useFakeTimers();
describe("Color mode based color", () => {
  it("uses the light value in light theme", () => {
    const tree = _reactTestRenderer.default.create( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(_box.default, {
      shadowColor: {
        light: "blue",
        dark: "brown"
      },
      borderColor: {
        light: "tomato",
        dark: "cyan"
      },
      backgroundColor: {
        light: "white",
        dark: "black"
      }
    }))).toJSON();
    expect(tree.children[0].props.style.shadowColor).toBe(_index.baseTheme.palette.blue);
    expect(tree.children[0].props.style.borderColor).toBe(_index.baseTheme.palette.tomato);
    expect(tree.children[0].props.style.backgroundColor).toBe(_index.baseTheme.palette.white);
  });
  it("uses the light value in light theme", () => {
    const tree = _reactTestRenderer.default.create( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, {
      initialColorMode: "dark"
    }, /*#__PURE__*/_react.default.createElement(_box.default, {
      shadowColor: {
        light: "blue",
        dark: "brown"
      },
      borderColor: {
        light: "tomato",
        dark: "cyan"
      },
      backgroundColor: {
        light: "white",
        dark: "black"
      }
    }))).toJSON();
    expect(tree.children[0].props.style.shadowColor).toBe(_index.baseTheme.palette.brown);
    expect(tree.children[0].props.style.borderColor).toBe(_index.baseTheme.palette.cyan);
    expect(tree.children[0].props.style.backgroundColor).toBe(_index.baseTheme.palette.black);
  });
});
//# sourceMappingURL=color-mode-background-color.spec.js.map