import React from "react";
import Text from "../../components/atoms/text/text";
import { render } from "@testing-library/react-native";
import { ThemeProvider } from "../../theme/src/theme-context";
import { useTheme } from "../useTheme";
jest.useFakeTimers();
const ThemeTestComponent = () => {
  const {
    colorMode
  } = useTheme();
  return /*#__PURE__*/React.createElement(Text, null, colorMode);
};
describe("useTheme", () => {
  it("loads the light theme by default", () => {
    const {
      getByText
    } = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(ThemeTestComponent, null)));
    expect(getByText("light")).toBeTruthy();
  });
  it("loads the dark theme when overriden", () => {
    const {
      getByText
    } = render( /*#__PURE__*/React.createElement(ThemeProvider, {
      initialColorMode: "dark"
    }, /*#__PURE__*/React.createElement(ThemeTestComponent, null)));
    expect(getByText("dark")).toBeTruthy();
  });
});
//# sourceMappingURL=useTheme.spec.js.map