Bladeren bron

refactoring and fixes

Daniel Zlotin 7 jaren geleden
bovenliggende
commit
106c303432

+ 20
- 0
integration/SingleScreen.test.js Bestand weergeven

1
+describe('single screen integration', () => {
2
+  let Navigation;
3
+  let mockNativeNavigation;
4
+
5
+  beforeEach(() => {
6
+    mockNativeNavigation = {};
7
+    require('react-native').NativeModules.NativeNavigation = mockNativeNavigation;
8
+    Navigation = require('../../src/index').default;
9
+  });
10
+
11
+  xit('startApp directs to native with constructed hirarchy for single screens', () => {
12
+    mockNativeNavigation.startApp = jest.fn();
13
+    Navigation.startApp({
14
+      container: {
15
+        key: 'com.integration.MyFirstScreen'
16
+      }
17
+    });
18
+    expect(mockNativeNavigation.startApp).toHaveBeenCalledTimes(1);
19
+  });
20
+});

integration/remx-support.test.js → integration/remx/remx.test.js Bestand weergeven

7
   let store;
7
   let store;
8
 
8
 
9
   beforeEach(() => {
9
   beforeEach(() => {
10
-    MyConnectedContainer = require('./remx-support-component').default;
11
-    store = require('./remx-support-store');
10
+    MyConnectedContainer = require('./remxComponent').default;
11
+    store = require('./remxStore');
12
   });
12
   });
13
 
13
 
14
   it('renders normally', () => {
14
   it('renders normally', () => {

integration/remx-support-component.js → integration/remx/remxComponent.js Bestand weergeven

3
 
3
 
4
 import {connect} from 'remx/react-native';
4
 import {connect} from 'remx/react-native';
5
 
5
 
6
-import {selectors} from './remx-support-store';
6
+import {selectors} from './remxStore';
7
 
7
 
8
 class MyContainer extends Component {
8
 class MyContainer extends Component {
9
   constructor(props) {
9
   constructor(props) {

integration/remx-support-store.js → integration/remx/remxStore.js Bestand weergeven


+ 177
- 0
playground/.gitignore Bestand weergeven

1
+############
2
+# Node
3
+############
4
+# Logs
5
+logs
6
+*.log
7
+npm-debug.log*
8
+
9
+# Runtime data
10
+pids
11
+*.pid
12
+*.seed
13
+
14
+# Directory for instrumented libs generated by jscoverage/JSCover
15
+lib-cov
16
+
17
+# Coverage directory used by tools like istanbul
18
+coverage
19
+
20
+# nyc test coverage
21
+.nyc_output
22
+
23
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24
+.grunt
25
+
26
+# node-waf configuration
27
+.lock-wscript
28
+
29
+# Compiled binary addons (http://nodejs.org/api/addons.html)
30
+build/Release
31
+
32
+# Dependency directories
33
+node_modules
34
+jspm_packages
35
+
36
+# Optional npm cache directory
37
+.npm
38
+
39
+# Optional REPL history
40
+.node_repl_history
41
+
42
+################
43
+# JetBrains
44
+################
45
+.idea
46
+
47
+## File-based project format:
48
+*.iws
49
+
50
+## Plugin-specific files:
51
+
52
+# IntelliJ
53
+/out/
54
+
55
+# mpeltonen/sbt-idea plugin
56
+.idea_modules/
57
+
58
+# JIRA plugin
59
+atlassian-ide-plugin.xml
60
+
61
+# Crashlytics plugin (for Android Studio and IntelliJ)
62
+com_crashlytics_export_strings.xml
63
+crashlytics.properties
64
+crashlytics-build.properties
65
+fabric.properties
66
+
67
+
68
+############
69
+# iOS
70
+############
71
+# Xcode
72
+#
73
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
74
+
75
+## Build generated
76
+ios/build/
77
+ios/DerivedData/
78
+
79
+## Various settings
80
+*.pbxuser
81
+!default.pbxuser
82
+*.mode1v3
83
+!default.mode1v3
84
+*.mode2v3
85
+!default.mode2v3
86
+*.perspectivev3
87
+!default.perspectivev3
88
+ios/xcuserdata/
89
+
90
+## Other
91
+*.moved-aside
92
+*.xcuserstate
93
+
94
+## Obj-C/Swift specific
95
+*.hmap
96
+*.ipa
97
+*.dSYM.zip
98
+*.dSYM
99
+
100
+# CocoaPods
101
+#
102
+# We recommend against adding the Pods directory to your .gitignore. However
103
+# you should judge for yourself, the pros and cons are mentioned at:
104
+# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
105
+#
106
+ios/Pods/
107
+
108
+# Carthage
109
+#
110
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
111
+# Carthage/Checkouts
112
+
113
+Carthage/Build
114
+
115
+# fastlane
116
+#
117
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
118
+# screenshots whenever they are needed.
119
+# For more information about the recommended setup visit:
120
+# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
121
+
122
+fastlane/report.xml
123
+fastlane/screenshots
124
+
125
+
126
+############
127
+# Android
128
+############
129
+# Built application files
130
+*.apk
131
+*.ap_
132
+
133
+# Files for the Dalvik VM
134
+*.dex
135
+
136
+# Java class files
137
+*.class
138
+
139
+# Generated files
140
+android/bin/
141
+android/gen/
142
+android/out/
143
+
144
+# Gradle files
145
+android/.gradle/
146
+android/build/
147
+
148
+# Local configuration file (sdk path, etc)
149
+local.properties
150
+
151
+# Proguard folder generated by Eclipse
152
+android/proguard/
153
+
154
+# Log Files
155
+*.log
156
+
157
+# Android Studio Navigation editor temp files
158
+android/.navigation/
159
+
160
+# Android Studio captures folder
161
+android/captures/
162
+
163
+# Intellij
164
+*.iml
165
+
166
+# Keystore files
167
+*.jks
168
+
169
+##################
170
+# React-Native
171
+##################
1
 # OSX
172
 # OSX
2
 #
173
 #
3
 .DS_Store
174
 .DS_Store
32
 #
203
 #
33
 node_modules/
204
 node_modules/
34
 npm-debug.log
205
 npm-debug.log
206
+
207
+# BUCK
208
+buck-out/
209
+\.buckd/
210
+android/app/libs
211
+android/keystores/debug.keystore

+ 3
- 3
playground/package.json Bestand weergeven

5
   "scripts": {
5
   "scripts": {
6
     "postinstall": "rm -rf node_modules/react-native-navigation/node_modules && rm -rf node_modules/react-native-navigation/playground",
6
     "postinstall": "rm -rf node_modules/react-native-navigation/node_modules && rm -rf node_modules/react-native-navigation/playground",
7
     "start": "watchman watch-del-all && (adb reverse tcp:8081 tcp:8081 || true) && node node_modules/react-native/local-cli/cli.js start --reset-cache",
7
     "start": "watchman watch-del-all && (adb reverse tcp:8081 tcp:8081 || true) && node node_modules/react-native/local-cli/cli.js start --reset-cache",
8
-    "xcode": "open ios/example.xcodeproj",
8
+    "xcode": "open ios/playground.xcodeproj",
9
     "android": "cd android && ./gradlew installDebug",
9
     "android": "cd android && ./gradlew installDebug",
10
     "e2e": "node ./scripts/e2e.ios.js"
10
     "e2e": "node ./scripts/e2e.ios.js"
11
   },
11
   },
21
   "detox": {
21
   "detox": {
22
     "session": {
22
     "session": {
23
       "server": "ws://localhost:8099",
23
       "server": "ws://localhost:8099",
24
-      "sessionId": "example"
24
+      "sessionId": "playground"
25
     },
25
     },
26
     "ios-simulator": {
26
     "ios-simulator": {
27
-      "app": "ios/DerivedData/example/Build/Products/Debug_Detox-iphonesimulator/example.app",
27
+      "app": "ios/DerivedData/playground/Build/Products/Debug_Detox-iphonesimulator/playground.app",
28
       "device": "iPhone 7, iOS 10.1"
28
       "device": "iPhone 7, iOS 10.1"
29
     }
29
     }
30
   }
30
   }

+ 1
- 3
src/Navigation.test.js Bestand weergeven

2
 
2
 
3
 describe('Navigation', () => {
3
 describe('Navigation', () => {
4
   let Navigation;
4
   let Navigation;
5
-  let Commands;
6
   let ContainerRegistry;
5
   let ContainerRegistry;
7
 
6
 
8
   beforeEach(() => {
7
   beforeEach(() => {
9
     jest.mock('./containers/ContainerRegistry');
8
     jest.mock('./containers/ContainerRegistry');
10
-    Navigation = require('./Navigation');
11
-    Commands = require('./commands/Commands');
12
     ContainerRegistry = require('./containers/ContainerRegistry');
9
     ContainerRegistry = require('./containers/ContainerRegistry');
10
+    Navigation = require('./Navigation');
13
   });
11
   });
14
 
12
 
15
   it('exposes static commands', () => {
13
   it('exposes static commands', () => {

src/commands/valid-commands.js → src/commands/ValidCommands.test.js Bestand weergeven

1
-export const singleContainerApp = {
1
+describe('valid commands', () => {
2
+  it('just works', () => {
3
+    //
4
+  });
5
+});
6
+
7
+const singleContainerApp = {
2
   container: {
8
   container: {
3
     key: 'com.example.FirstTabContainer'
9
     key: 'com.example.FirstTabContainer'
4
   }
10
   }
5
 };
11
 };
6
 
12
 
7
-export const tabBasedApp = {
13
+const tabBasedApp = {
8
   tabs: [
14
   tabs: [
9
     {
15
     {
10
       container: {
16
       container: {
24
   ]
30
   ]
25
 };
31
 };
26
 
32
 
27
-export const singleWithSideMenu = {
33
+const singleWithSideMenu = {
28
   container: {
34
   container: {
29
     key: 'com.example.MyContainer'
35
     key: 'com.example.MyContainer'
30
   },
36
   },
35
   }
41
   }
36
 };
42
 };
37
 
43
 
38
-export const singleWithRightSideMenu = {
44
+const singleWithRightSideMenu = {
39
   container: {
45
   container: {
40
     key: 'com.example.MyContainer'
46
     key: 'com.example.MyContainer'
41
   },
47
   },
46
   }
52
   }
47
 };
53
 };
48
 
54
 
49
-export const singleWithBothMenus = {
55
+const singleWithBothMenus = {
50
   container: {
56
   container: {
51
     key: 'com.example.MyContainer'
57
     key: 'com.example.MyContainer'
52
   },
58
   },
60
   }
66
   }
61
 };
67
 };
62
 
68
 
63
-export const tabBasedWithSideMenu = {
69
+const tabBasedWithSideMenu = {
64
   tabs: [
70
   tabs: [
65
     {
71
     {
66
       container: {
72
       container: {

+ 4
- 8
src/containers/ContainerRegistry.js Bestand weergeven

1
 import React, {Component} from 'react';
1
 import React, {Component} from 'react';
2
 import {AppRegistry} from 'react-native';
2
 import {AppRegistry} from 'react-native';
3
-import * as PropsStore from './PropsStore';
4
-import * as ContainerStore from './ContainerStore';
3
+import * as Store from './Store';
5
 
4
 
6
 export function registerContainer(containerKey, getContainerFunc) {
5
 export function registerContainer(containerKey, getContainerFunc) {
7
   const OriginalContainer = getContainerFunc();
6
   const OriginalContainer = getContainerFunc();
8
   const NavigationContainer = wrapContainer(containerKey, OriginalContainer);
7
   const NavigationContainer = wrapContainer(containerKey, OriginalContainer);
9
-  ContainerStore.setContainerClass(containerKey, NavigationContainer);
8
+  Store.setContainerClass(containerKey, NavigationContainer);
10
   AppRegistry.registerComponent(containerKey, () => NavigationContainer);
9
   AppRegistry.registerComponent(containerKey, () => NavigationContainer);
11
 }
10
 }
12
 
11
 
13
-export const bla = {};
14
-
15
 function wrapContainer(containerKey, OriginalContainer) {
12
 function wrapContainer(containerKey, OriginalContainer) {
16
   return class extends Component {
13
   return class extends Component {
17
     constructor(props) {
14
     constructor(props) {
21
       }
18
       }
22
       this.state = {
19
       this.state = {
23
         containerId: props.containerId,
20
         containerId: props.containerId,
24
-        allProps: {...props, ...PropsStore.getPropsForContainerId(props.containerId)}
21
+        allProps: {...props, ...Store.getPropsForContainerId(props.containerId)}
25
       };
22
       };
26
     }
23
     }
27
 
24
 
28
     componentWillReceiveProps(nextProps) {
25
     componentWillReceiveProps(nextProps) {
29
       this.setState({
26
       this.setState({
30
-        allProps: {...nextProps, ...PropsStore.getPropsForContainerId(this.state.containerId)}
27
+        allProps: {...nextProps, ...Store.getPropsForContainerId(this.state.containerId)}
31
       });
28
       });
32
     }
29
     }
33
 
30
 
34
     render() {
31
     render() {
35
       return (
32
       return (
36
         <OriginalContainer
33
         <OriginalContainer
37
-          ref={(r) => bla.ref = r}
38
           {...this.state.allProps}
34
           {...this.state.allProps}
39
           containerId={this.state.containerId}
35
           containerId={this.state.containerId}
40
         />
36
         />

+ 13
- 18
src/containers/ContainerRegistry.test.js Bestand weergeven

2
 import {AppRegistry, Text} from 'react-native';
2
 import {AppRegistry, Text} from 'react-native';
3
 import renderer from 'react-test-renderer';
3
 import renderer from 'react-test-renderer';
4
 
4
 
5
-describe('ComponentRegistry', () => {
5
+describe('ContainerRegistry', () => {
6
   let uut;
6
   let uut;
7
+  let store;
7
   let myContainerRef;
8
   let myContainerRef;
8
   let testParentRef;
9
   let testParentRef;
9
-  let containerStore;
10
 
10
 
11
   class MyContainer extends Component {
11
   class MyContainer extends Component {
12
     constructor(props) {
12
     constructor(props) {
37
 
37
 
38
   beforeEach(() => {
38
   beforeEach(() => {
39
     uut = require('./ContainerRegistry');
39
     uut = require('./ContainerRegistry');
40
-    containerStore = require('./ContainerStore');
41
-  });
42
-
43
-  afterEach(() => {
44
-    myContainerRef = null;
45
-    testParentRef = null;
40
+    store = require('./Store');
46
   });
41
   });
47
 
42
 
48
   describe('registerContainer', () => {
43
   describe('registerContainer', () => {
65
     });
60
     });
66
   });
61
   });
67
 
62
 
68
-  describe('NavigationContainer wrapping', () => {
63
+  describe('NavigationContainer wrapping passed container', () => {
69
     const containerKey = 'example.MyContainer';
64
     const containerKey = 'example.MyContainer';
70
 
65
 
71
     beforeEach(() => {
66
     beforeEach(() => {
73
     });
68
     });
74
 
69
 
75
     it('must have containerId as prop', () => {
70
     it('must have containerId as prop', () => {
76
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
71
+      const NavigationContainer = store.getContainerClass(containerKey);
77
       expect(() => {
72
       expect(() => {
78
         renderer.create(<NavigationContainer/>);
73
         renderer.create(<NavigationContainer/>);
79
       }).toThrow(new Error('Container example.MyContainer does not have a containerId!'));
74
       }).toThrow(new Error('Container example.MyContainer does not have a containerId!'));
80
     });
75
     });
81
 
76
 
82
     it('wraps the container and saves to store', () => {
77
     it('wraps the container and saves to store', () => {
83
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
78
+      const NavigationContainer = store.getContainerClass(containerKey);
84
       expect(NavigationContainer).not.toBeInstanceOf(MyContainer);
79
       expect(NavigationContainer).not.toBeInstanceOf(MyContainer);
85
       const tree = renderer.create(<NavigationContainer containerId={'container1'}/>);
80
       const tree = renderer.create(<NavigationContainer containerId={'container1'}/>);
86
       expect(tree.toJSON().children).toEqual(['Hello, World!']);
81
       expect(tree.toJSON().children).toEqual(['Hello, World!']);
88
     });
83
     });
89
 
84
 
90
     it('injects props from wrapper into original container', () => {
85
     it('injects props from wrapper into original container', () => {
91
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
86
+      const NavigationContainer = store.getContainerClass(containerKey);
92
       renderer.create(<NavigationContainer containerId={'container1'} myProp={'yo'}/>);
87
       renderer.create(<NavigationContainer containerId={'container1'} myProp={'yo'}/>);
93
       expect(myContainerRef.props.myProp).toEqual('yo');
88
       expect(myContainerRef.props.myProp).toEqual('yo');
94
     });
89
     });
95
 
90
 
96
     it('updates props from wrapper into original container', () => {
91
     it('updates props from wrapper into original container', () => {
97
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
92
+      const NavigationContainer = store.getContainerClass(containerKey);
98
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
93
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
99
       expect(myContainerRef.props.foo).toEqual(undefined);
94
       expect(myContainerRef.props.foo).toEqual(undefined);
100
       testParentRef.setState({propsFromState: {foo: 'yo'}});
95
       testParentRef.setState({propsFromState: {foo: 'yo'}});
102
     });
97
     });
103
 
98
 
104
     it('pulls props from the PropsStore and injects them into the inner container', () => {
99
     it('pulls props from the PropsStore and injects them into the inner container', () => {
105
-      require('./PropsStore').setPropsForContainerId('container123', {numberProp: 1, stringProp: 'hello', objectProp: {a: 2}});
106
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
100
+      store.setPropsForContainerId('container123', {numberProp: 1, stringProp: 'hello', objectProp: {a: 2}});
101
+      const NavigationContainer = store.getContainerClass(containerKey);
107
       renderer.create(<NavigationContainer containerId={'container123'}/>);
102
       renderer.create(<NavigationContainer containerId={'container123'}/>);
108
       expect(myContainerRef.props).toEqual({containerId: 'container123', numberProp: 1, stringProp: 'hello', objectProp: {a: 2}});
103
       expect(myContainerRef.props).toEqual({containerId: 'container123', numberProp: 1, stringProp: 'hello', objectProp: {a: 2}});
109
     });
104
     });
110
 
105
 
111
     it('updates props from PropsStore into inner container', () => {
106
     it('updates props from PropsStore into inner container', () => {
112
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
107
+      const NavigationContainer = store.getContainerClass(containerKey);
113
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
108
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
114
-      require('./PropsStore').setPropsForContainerId('container1', {myProp: 'hello'});
109
+      store.setPropsForContainerId('container1', {myProp: 'hello'});
115
       expect(myContainerRef.props.foo).toEqual(undefined);
110
       expect(myContainerRef.props.foo).toEqual(undefined);
116
       expect(myContainerRef.props.myProp).toEqual(undefined);
111
       expect(myContainerRef.props.myProp).toEqual(undefined);
117
       testParentRef.setState({propsFromState: {foo: 'yo'}});
112
       testParentRef.setState({propsFromState: {foo: 'yo'}});
120
     });
115
     });
121
 
116
 
122
     it('protects containerId from change', () => {
117
     it('protects containerId from change', () => {
123
-      const NavigationContainer = containerStore.getContainerClass(containerKey);
118
+      const NavigationContainer = store.getContainerClass(containerKey);
124
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
119
       renderer.create(<TestParent ChildClass={NavigationContainer}/>);
125
       expect(myContainerRef.props.containerId).toEqual('container1');
120
       expect(myContainerRef.props.containerId).toEqual('container1');
126
       testParentRef.setState({propsFromState: {containerId: 'ERROR'}});
121
       testParentRef.setState({propsFromState: {containerId: 'ERROR'}});

+ 0
- 11
src/containers/ContainerStore.js Bestand weergeven

1
-const state = {
2
-  containersByKey: {}
3
-};
4
-
5
-export function setContainerClass(containerKey, ContainerClass) {
6
-  state.containersByKey[containerKey] = ContainerClass;
7
-}
8
-
9
-export function getContainerClass(containerKey) {
10
-  return state.containersByKey[containerKey];
11
-}

+ 0
- 19
src/containers/ContainerStore.test.js Bestand weergeven

1
-describe('ContainerStore', () => {
2
-  let uut;
3
-
4
-  beforeEach(() => {
5
-    uut = require('./ContainerStore');
6
-  });
7
-
8
-  class Component {
9
-    //
10
-  }
11
-  class MyComponent extends Component {
12
-    //
13
-  }
14
-
15
-  it('holds containers classes by containerKey', () => {
16
-    uut.setContainerClass('example.mykey', MyComponent);
17
-    expect(uut.getContainerClass('example.mykey')).toEqual(MyComponent);
18
-  });
19
-});

+ 0
- 11
src/containers/PropsStore.js Bestand weergeven

1
-import _ from 'lodash';
2
-
3
-const propsByContainerId = {};
4
-
5
-export function setPropsForContainerId(containerId, props) {
6
-  _.set(propsByContainerId, containerId, props);
7
-}
8
-
9
-export function getPropsForContainerId(containerId) {
10
-  return _.get(propsByContainerId, containerId, {});
11
-}

+ 22
- 0
src/containers/Store.js Bestand weergeven

1
+import _ from 'lodash';
2
+
3
+const state = {
4
+  propsByContainerId: {},
5
+  containersByKey: {}
6
+};
7
+
8
+export function setPropsForContainerId(containerId, props) {
9
+  _.set(state.propsByContainerId, containerId, props);
10
+}
11
+
12
+export function getPropsForContainerId(containerId) {
13
+  return _.get(state.propsByContainerId, containerId, {});
14
+}
15
+
16
+export function setContainerClass(containerKey, ContainerClass) {
17
+  state.containersByKey[containerKey] = ContainerClass;
18
+}
19
+
20
+export function getContainerClass(containerKey) {
21
+  return state.containersByKey[containerKey];
22
+}

src/containers/PropsStore.test.js → src/containers/Store.test.js Bestand weergeven

1
-describe('PropsStore', () => {
1
+describe('Store', () => {
2
   let uut;
2
   let uut;
3
 
3
 
4
   beforeEach(() => {
4
   beforeEach(() => {
5
-    uut = require('./PropsStore');
5
+    uut = require('./Store');
6
   });
6
   });
7
 
7
 
8
   it('initial state', () => {
8
   it('initial state', () => {
19
     uut.setPropsForContainerId(undefined, undefined);
19
     uut.setPropsForContainerId(undefined, undefined);
20
     expect(uut.getPropsForContainerId('container1')).toEqual({});
20
     expect(uut.getPropsForContainerId('container1')).toEqual({});
21
   });
21
   });
22
+
23
+  it('holds containers classes by containerKey', () => {
24
+    const MyComponent = class {
25
+      //
26
+    };
27
+    uut.setContainerClass('example.mykey', MyComponent);
28
+    expect(uut.getContainerClass('example.mykey')).toEqual(MyComponent);
29
+  });
22
 });
30
 });
31
+

+ 2
- 3
src/index.js Bestand weergeven

1
-import * as NavigationInner from './Navigation';
1
+import * as Navigation from './Navigation';
2
 
2
 
3
-export default NavigationInner;
4
-export const Navigation = NavigationInner;
3
+export default Navigation;

+ 6
- 6
src/index.test.js Bestand weergeven

1
+import Navigation from './index';
2
+
1
 describe('index', () => {
3
 describe('index', () => {
2
   let uut;
4
   let uut;
3
 
5
 
4
   beforeEach(() => {
6
   beforeEach(() => {
5
-    uut = require('./index');
7
+    uut = require('./index').default;
6
   });
8
   });
7
 
9
 
8
-  it('exposes Navigation as default or as Object', () => {
9
-    expect(uut.Navigation).toBeDefined();
10
-    expect(uut.Navigation).toEqual(uut.default);
11
-    expect(uut.Navigation.startApp).toBeInstanceOf(Function);
12
-    expect(uut.default.startApp).toBeInstanceOf(Function);
10
+  it('exposes Navigation as default', () => {
11
+    expect(uut.startApp).toBeInstanceOf(Function);
12
+    expect(Navigation.startApp).toBeInstanceOf(Function);
13
   });
13
   });
14
 });
14
 });