Mock StatusBarManager is missing getHeight() method
See original GitHub issueReact Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (12) x64 Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 110.67 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm SDKs: iOS SDK: Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3 Android SDK: API Levels: 23, 26, 27, 28 Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3 System Images: android-27 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.6.1 => 16.6.1 react-native: 0.57.5 => 0.57.5
StatusBarManager
is missing getHeight() when running jest
, which result in failed tests.
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Ok, so maybe you can resolve this issue by simply using the
HEIGHT
constant instead of the method? That one should work even in jest tests if you look at this old issue: https://github.com/facebook/react-native/issues/11701Alternatively, feel free to open a PR which adds that method to the mock 😃
Nice, thanks @bartolkaruza!