NativeBase works with react-native's jest preset or expo's jest-expo preset. However, there's one thing you'll need to do for it to work as expected.
- NativeBaseProvider uses SafeAreaContext which needs initialWindowMetrics to be passed to the Provider while testing.
Not following the above may lead to an error related to SafeAreaProvider while running
To fix the above issue, you can simply pass initialWindowMetrics to NativeBaseProvider in your tests.