Open Kudo opened 2 days ago
we can either mock https://github.com/facebook/react-native/blob/9a60038a40e16925ea1adeb3e3c937c22a615485/packages/react-native/Libraries/Utilities/Appearance.js. but that feels more complex to mock getColorScheme()
, setColorScheme()
, addChangeListener()
to correct behavior.
Summary:
currently running jest test, it shows an error:
it is a regression from #46123 that to have a lazy require.
this pr tries to mock
useColorScheme
to returnlight
. i think we don't necessarily test the color scheme changes in jest runtime. originallyuseColorScheme
also returnslight
because of this statementChangelog:
[GENERAL] [FIXED] - Fixed jest error from Appearance.js
Test Plan: