Skip to content

Commit 79fd31e

Browse files
authored
Postpone back handler registration (#251)
* remove obsolete backhandler checks * ignore .expo * postpone backhandler registration fix
1 parent 92123fb commit 79fd31e

File tree

5 files changed

+505
-190
lines changed

5 files changed

+505
-190
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
npm-debug.log
33
coverage
44
target
5+
.expo

__mocks__/react-native.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ const Platform = {
4949
const PixelRatio = {
5050
roundToNearestPixel: n => n,
5151
}
52+
const BackHandler = {
53+
addEventListener: jest.fn(),
54+
removeEventListener: jest.fn(),
55+
}
5256

5357
ReactNative.View = View;
5458
ReactNative.ScrollView = ScrollView;
@@ -65,5 +69,6 @@ ReactNative.Animated = Animated;
6569
ReactNative.I18nManager = I18nManager;
6670
ReactNative.Platform = Platform;
6771
ReactNative.PixelRatio = PixelRatio;
72+
ReactNative.BackHandler = BackHandler;
6873

6974
module.exports = ReactNative;

0 commit comments

Comments
 (0)