"use strict";

var _react = _interopRequireDefault(require("react"));
var _text = _interopRequireDefault(require("../../components/atoms/text/text"));
var _reactNative = require("@testing-library/react-native");
var _themeContext = require("../../theme/src/theme-context");
var _useColorModeValue = require("../useColorModeValue");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
jest.useFakeTimers();
const TestComponent = () => {
  const bg = (0, _useColorModeValue.useColorModeValue)("neutral.200", "pink");
  return /*#__PURE__*/_react.default.createElement(_text.default, null, bg.toString());
};
describe("useColorModeValue", () => {
  it("shows the correct color in light mode", () => {
    const {
      getByText
    } = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, {
      initialColorMode: "light"
    }, /*#__PURE__*/_react.default.createElement(TestComponent, null)));
    expect(getByText("neutral.200")).toBeTruthy();
  });
  it("shows the correct color in dark mode", () => {
    const {
      getByText
    } = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, {
      initialColorMode: "dark"
    }, /*#__PURE__*/_react.default.createElement(TestComponent, null)));
    expect(getByText("pink")).toBeTruthy();
  });
});
//# sourceMappingURL=useColorModeValue.spec.js.map