title: react native Jest mock useColorScheme
body: <p>I am trying to mock the useColorScheme hook from react native so I can control what values it returns. My code is below:</p>
  <pre><code>const mockColorScheme = jest.fn();
  
  jest.mock('react-native/Libraries/Utilities/useColorScheme', () =&gt; ({
    useColorScheme: mockColorScheme,
  }));
  
  it('Renders correct theme when user selects light', () =&gt; {
      const wrapper = ({children}: any) =&gt; (
        &lt;ThemeProvider userIsUsingDarkMode={false} userIsUsingSystemTheme={false}&gt;
          {children}
        &lt;/ThemeProvider&gt;
      );
  
      const {result} = renderHook(() =&gt; useTheme(), {wrapper});
  
      expect(result.current.theme).toBeDefined();
      expect(result.current.theme?.text).toStrictEqual('#333');
  
      mockColorScheme.mockImplementationOnce(() =&gt; 'dark');
  
      expect(result.current.theme).toBeDefined();
      expect(result.current.theme?.text).toStrictEqual('#fbfbfb');
    });
  </code></pre>
  <p>I would expect this to work, but I get the following error:</p>
  <pre><code>TypeError: (0 , _reactNative.useColorScheme) is not a function
  </code></pre>
  <p>This comes from my ThemeProvider component:</p>
  <pre><code>export const ThemeProvider: FunctionComponent&lt;ThemeProviderProps&gt; = ({
    children,
    userIsUsingDarkMode,
    userIsUsingSystemTheme,
  }) =&gt; {
    const isDarkMode = useColorScheme() === 'dark';
  </code></pre>
  <p>...</p>
  <pre><code>export const useTheme = () =&gt; {
    return useContext(ThemeContext);
  };
  </code></pre>
  <p>If anyone has any ideas as to how to mock this I would really appreciate it. Thank you.</p>