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 { useColorModeValue } from "../useColorModeValue";
jest.useFakeTimers();
const TestComponent: React.FC = () => {
const bg = useColorModeValue("neutral.200", "pink");
return {bg.toString()};
};
describe("useColorModeValue", () => {
it("shows the correct color in light mode", () => {
const { getByText } = render(
);
expect(getByText("neutral.200")).toBeTruthy();
});
it("shows the correct color in dark mode", () => {
const { getByText } = render(
);
expect(getByText("pink")).toBeTruthy();
});
});