"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 _useTheme = require("../useTheme");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
jest.useFakeTimers();
const ThemeTestComponent = () => {
  const {
    colorMode
  } = (0, _useTheme.useTheme)();
  return /*#__PURE__*/_react.default.createElement(_text.default, null, colorMode);
};
describe("useTheme", () => {
  it("loads the light theme by default", () => {
    const {
      getByText
    } = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(ThemeTestComponent, null)));
    expect(getByText("light")).toBeTruthy();
  });
  it("loads the dark theme when overriden", () => {
    const {
      getByText
    } = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, {
      initialColorMode: "dark"
    }, /*#__PURE__*/_react.default.createElement(ThemeTestComponent, null)));
    expect(getByText("dark")).toBeTruthy();
  });
});
//# sourceMappingURL=useTheme.spec.js.map