Browse Source

rename navigationOptions to Options

Daniel Zlotin 6 years ago
parent
commit
e16f025d03

+ 1
- 1
e2e/ScreenStyle.test.js View File

@@ -8,7 +8,7 @@ describe('screen style', () => {
8 8
     await device.relaunchApp();
9 9
   });
10 10
 
11
-  it('declare a navigationOptions on container component', async () => {
11
+  it('declare a options on container component', async () => {
12 12
     await elementById(testIDs.PUSH_OPTIONS_BUTTON).tap();
13 13
     await expect(element(by.label('Static Title'))).toBeVisible();
14 14
   });

+ 3
- 3
lib/src/commands/Commands.test.js View File

@@ -31,7 +31,7 @@ describe('Commands', () => {
31 31
         children: [],
32 32
         data: {
33 33
           name: 'com.example.MyScreen',
34
-          navigationOptions: {}
34
+          options: {}
35 35
         }
36 36
       });
37 37
     });
@@ -94,7 +94,7 @@ describe('Commands', () => {
94 94
         id: 'Component+UNIQUE_ID',
95 95
         data: {
96 96
           name: 'com.example.MyScreen',
97
-          navigationOptions: {}
97
+          options: {}
98 98
         },
99 99
         children: []
100 100
       });
@@ -176,7 +176,7 @@ describe('Commands', () => {
176 176
         id: 'Component+UNIQUE_ID',
177 177
         data: {
178 178
           name: 'com.example.MyScreen',
179
-          navigationOptions: {}
179
+          options: {}
180 180
         },
181 181
         children: []
182 182
       });

+ 5
- 5
lib/src/commands/LayoutTreeCrawler.js View File

@@ -23,19 +23,19 @@ class LayoutTreeCrawler {
23 23
   _handleContainer(node) {
24 24
     this._assertContainerDataName(node);
25 25
     this._savePropsToStore(node);
26
-    this._applyStaticNavigationOptions(node);
27
-    OptionsProcessor.processOptions(node.data.navigationOptions);
26
+    this._applyStaticOptions(node);
27
+    OptionsProcessor.processOptions(node.data.options);
28 28
   }
29 29
 
30 30
   _savePropsToStore(node) {
31 31
     this.store.setPropsForContainerId(node.id, node.data.passProps);
32 32
   }
33 33
 
34
-  _applyStaticNavigationOptions(node) {
34
+  _applyStaticOptions(node) {
35 35
     const clazz = this.store.getOriginalContainerClassForName(node.data.name) || {};
36 36
     const staticOptions = _.cloneDeep(clazz.navigationOptions) || {};
37
-    const passedOptions = _.cloneDeep(node.data.navigationOptions) || {};
38
-    node.data.navigationOptions = _.merge({}, staticOptions, passedOptions);
37
+    const passedOptions = node.data.options || {};
38
+    node.data.options = _.merge({}, staticOptions, passedOptions);
39 39
   }
40 40
 
41 41
   _assertKnownLayoutType(type) {

+ 42
- 42
lib/src/commands/LayoutTreeCrawler.test.js View File

@@ -47,10 +47,10 @@ describe('LayoutTreeCrawler', () => {
47 47
     expect(store.getPropsForContainerId('Component+UNIQUE_ID')).toEqual({ myProp: 123 });
48 48
   });
49 49
 
50
-  it('Containers: injects navigationOptions from original container class static property', () => {
50
+  it('Containers: injects options from original container class static property', () => {
51 51
     const theStyle = {};
52 52
     const MyContainer = class {
53
-      static get navigationOptions() {
53
+      static get options() {
54 54
         return theStyle;
55 55
       }
56 56
     };
@@ -58,10 +58,10 @@ describe('LayoutTreeCrawler', () => {
58 58
     const node = { type: LayoutTypes.Component, data: { name: 'theContainerName' } };
59 59
     store.setOriginalContainerClassForName('theContainerName', MyContainer);
60 60
     uut.crawl(node);
61
-    expect(node.data.navigationOptions).toEqual(theStyle);
61
+    expect(node.data.options).toEqual(theStyle);
62 62
   });
63 63
 
64
-  it('Containers: merges navigationOptions from container class static property with passed options, favoring passed options', () => {
64
+  it('Containers: merges options from container class static property with passed options, favoring passed options', () => {
65 65
     const theStyle = {
66 66
       bazz: 123,
67 67
       inner: {
@@ -83,12 +83,12 @@ describe('LayoutTreeCrawler', () => {
83 83
       }
84 84
     };
85 85
 
86
-    const node = { type: LayoutTypes.Component, data: { name: 'theContainerName', navigationOptions: passedOptions } };
86
+    const node = { type: LayoutTypes.Component, data: { name: 'theContainerName', options: passedOptions } };
87 87
     store.setOriginalContainerClassForName('theContainerName', MyContainer);
88 88
 
89 89
     uut.crawl(node);
90 90
 
91
-    expect(node.data.navigationOptions).toEqual({
91
+    expect(node.data.options).toEqual({
92 92
       aaa: 'exists only in passed',
93 93
       bazz: 789,
94 94
       inner: {
@@ -98,10 +98,10 @@ describe('LayoutTreeCrawler', () => {
98 98
     });
99 99
   });
100 100
 
101
-  it('Component: deepClones navigationOptions', () => {
101
+  it('Component: deepClones options', () => {
102 102
     const theStyle = {};
103 103
     const MyContainer = class {
104
-      static get navigationOptions() {
104
+      static get options() {
105 105
         return theStyle;
106 106
       }
107 107
     };
@@ -109,7 +109,7 @@ describe('LayoutTreeCrawler', () => {
109 109
     const node = { type: LayoutTypes.Component, data: { name: 'theContainerName' } };
110 110
     store.setOriginalContainerClassForName('theContainerName', MyContainer);
111 111
     uut.crawl(node);
112
-    expect(node.data.navigationOptions).not.toBe(theStyle);
112
+    expect(node.data.options).not.toBe(theStyle);
113 113
   });
114 114
 
115 115
   it('Containers: must contain data name', () => {
@@ -117,94 +117,94 @@ describe('LayoutTreeCrawler', () => {
117 117
     expect(() => uut.crawl(node)).toThrow(new Error('Missing container data.name'));
118 118
   });
119 119
 
120
-  it('Containers: navigationOptions default obj', () => {
120
+  it('Containers: options default obj', () => {
121 121
     const MyContainer = class { };
122 122
 
123 123
     const node = { type: LayoutTypes.Component, data: { name: 'theContainerName' } };
124 124
     store.setOriginalContainerClassForName('theContainerName', MyContainer);
125 125
     uut.crawl(node);
126
-    expect(node.data.navigationOptions).toEqual({});
126
+    expect(node.data.options).toEqual({});
127 127
   });
128 128
 
129 129
   describe('navigation options', () => {
130
-    let navigationOptions;
130
+    let options;
131 131
     let node;
132 132
 
133 133
     beforeEach(() => {
134
-      navigationOptions = {};
135
-      node = { type: LayoutTypes.Component, data: { name: 'theContainerName', navigationOptions } };
134
+      options = {};
135
+      node = { type: LayoutTypes.Component, data: { name: 'theContainerName', options } };
136 136
     });
137 137
 
138 138
     it('processes colors into numeric AARRGGBB', () => {
139
-      navigationOptions.someKeyColor = 'red';
139
+      options.someKeyColor = 'red';
140 140
       uut.crawl(node);
141
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xffff0000);
141
+      expect(node.data.options.someKeyColor).toEqual(0xffff0000);
142 142
     });
143 143
 
144 144
     it('processes colors into numeric AARRGGBB', () => {
145
-      navigationOptions.someKeyColor = 'yellow';
145
+      options.someKeyColor = 'yellow';
146 146
       uut.crawl(node);
147
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xffffff00);
147
+      expect(node.data.options.someKeyColor).toEqual(0xffffff00);
148 148
     });
149 149
 
150 150
     it('processes numeric colors', () => {
151
-      navigationOptions.someKeyColor = '#123456';
151
+      options.someKeyColor = '#123456';
152 152
       uut.crawl(node);
153
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xff123456);
153
+      expect(node.data.options.someKeyColor).toEqual(0xff123456);
154 154
     });
155 155
 
156 156
     it('processes numeric colors with rrggbbAA', () => {
157
-      navigationOptions.someKeyColor = 0x123456ff; // wut
157
+      options.someKeyColor = 0x123456ff; // wut
158 158
       uut.crawl(node);
159
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xff123456);
159
+      expect(node.data.options.someKeyColor).toEqual(0xff123456);
160 160
     });
161 161
 
162 162
     it('process colors with rgb functions', () => {
163
-      navigationOptions.someKeyColor = 'rgb(255, 0, 255)';
163
+      options.someKeyColor = 'rgb(255, 0, 255)';
164 164
       uut.crawl(node);
165
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xffff00ff);
165
+      expect(node.data.options.someKeyColor).toEqual(0xffff00ff);
166 166
     });
167 167
 
168 168
     it('process colors with special words', () => {
169
-      navigationOptions.someKeyColor = 'fuchsia';
169
+      options.someKeyColor = 'fuchsia';
170 170
       uut.crawl(node);
171
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xffff00ff);
171
+      expect(node.data.options.someKeyColor).toEqual(0xffff00ff);
172 172
     });
173 173
 
174 174
     it('process colors with hsla functions', () => {
175
-      navigationOptions.someKeyColor = 'hsla(360, 100%, 100%, 1.0)';
175
+      options.someKeyColor = 'hsla(360, 100%, 100%, 1.0)';
176 176
       uut.crawl(node);
177
-      expect(node.data.navigationOptions.someKeyColor).toEqual(0xffffffff);
177
+      expect(node.data.options.someKeyColor).toEqual(0xffffffff);
178 178
     });
179 179
 
180 180
     it('unknown colors return undefined', () => {
181
-      navigationOptions.someKeyColor = 'wut';
181
+      options.someKeyColor = 'wut';
182 182
       uut.crawl(node);
183
-      expect(node.data.navigationOptions.someKeyColor).toEqual(undefined);
183
+      expect(node.data.options.someKeyColor).toEqual(undefined);
184 184
     });
185 185
 
186 186
     it('any keys ending with Color', () => {
187
-      navigationOptions.otherKeyColor = 'red';
188
-      navigationOptions.yetAnotherColor = 'blue';
189
-      navigationOptions.andAnotherColor = 'rgb(0, 255, 0)';
187
+      options.otherKeyColor = 'red';
188
+      options.yetAnotherColor = 'blue';
189
+      options.andAnotherColor = 'rgb(0, 255, 0)';
190 190
       uut.crawl(node);
191
-      expect(node.data.navigationOptions.otherKeyColor).toEqual(0xffff0000);
192
-      expect(node.data.navigationOptions.yetAnotherColor).toEqual(0xff0000ff);
193
-      expect(node.data.navigationOptions.andAnotherColor).toEqual(0xff00ff00);
191
+      expect(node.data.options.otherKeyColor).toEqual(0xffff0000);
192
+      expect(node.data.options.yetAnotherColor).toEqual(0xff0000ff);
193
+      expect(node.data.options.andAnotherColor).toEqual(0xff00ff00);
194 194
     });
195 195
 
196 196
     it('keys ending with Color case sensitive', () => {
197
-      navigationOptions.otherKey_color = 'red'; // eslint-disable-line camelcase
197
+      options.otherKey_color = 'red'; // eslint-disable-line camelcase
198 198
       uut.crawl(node);
199
-      expect(node.data.navigationOptions.otherKey_color).toEqual('red');
199
+      expect(node.data.options.otherKey_color).toEqual('red');
200 200
     });
201 201
 
202 202
     it('any nested recursive keys ending with Color', () => {
203
-      navigationOptions.innerObj = { theKeyColor: 'red' };
204
-      navigationOptions.innerObj.innerMostObj = { anotherColor: 'yellow' };
203
+      options.innerObj = { theKeyColor: 'red' };
204
+      options.innerObj.innerMostObj = { anotherColor: 'yellow' };
205 205
       uut.crawl(node);
206
-      expect(node.data.navigationOptions.innerObj.theKeyColor).toEqual(0xffff0000);
207
-      expect(node.data.navigationOptions.innerObj.innerMostObj.anotherColor).toEqual(0xffffff00);
206
+      expect(node.data.options.innerObj.theKeyColor).toEqual(0xffff0000);
207
+      expect(node.data.options.innerObj.innerMostObj.anotherColor).toEqual(0xffffff00);
208 208
     });
209 209
   });
210 210
 });

+ 4
- 4
lib/src/commands/OptionsProcessor.js View File

@@ -3,14 +3,14 @@ const { processColor } = require('react-native');
3 3
 const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource');
4 4
 
5 5
 class OptionsProcessor {
6
-  static processOptions(navigationOptions) {
7
-    _.forEach(navigationOptions, (value, key) => {
6
+  static processOptions(options) {
7
+    _.forEach(options, (value, key) => {
8 8
       if (value) {
9 9
         if (_.endsWith(key, 'Color')) {
10
-          navigationOptions[key] = processColor(value);
10
+          options[key] = processColor(value);
11 11
         }
12 12
         if (_.isEqual(key, 'icon') || _.endsWith(key, 'Icon') || _.endsWith(key, 'Image')) {
13
-          navigationOptions[key] = resolveAssetSource(navigationOptions[key]);
13
+          options[key] = resolveAssetSource(options[key]);
14 14
         }
15 15
         if (_.isObject(value) || _.isArray(value)) {
16 16
           OptionsProcessor.processOptions(value);

+ 55
- 55
lib/src/commands/OptionsProcessor.test.js View File

@@ -1,103 +1,103 @@
1 1
 const OptionsProcessor = require('./OptionsProcessor');
2
-const NavigationOptions = require('./../params/options/NavigationOptions');
2
+const Options = require('./../params/options/Options');
3 3
 
4 4
 describe('navigation options', () => {
5
-  let navigationOptions;
5
+  let options;
6 6
 
7 7
   beforeEach(() => {
8
-    navigationOptions = {};
8
+    options = {};
9 9
   });
10 10
 
11 11
   it('processes colors into numeric AARRGGBB', () => {
12
-    navigationOptions.someKeyColor = 'red';
13
-    OptionsProcessor.processOptions(navigationOptions);
14
-    expect(navigationOptions.someKeyColor).toEqual(0xffff0000);
12
+    options.someKeyColor = 'red';
13
+    OptionsProcessor.processOptions(options);
14
+    expect(options.someKeyColor).toEqual(0xffff0000);
15 15
 
16
-    navigationOptions.someKeyColor = 'yellow';
17
-    OptionsProcessor.processOptions(navigationOptions);
18
-    expect(navigationOptions.someKeyColor).toEqual(0xffffff00);
16
+    options.someKeyColor = 'yellow';
17
+    OptionsProcessor.processOptions(options);
18
+    expect(options.someKeyColor).toEqual(0xffffff00);
19 19
   });
20 20
 
21 21
   it('processes numeric colors', () => {
22
-    navigationOptions.someKeyColor = '#123456';
23
-    OptionsProcessor.processOptions(navigationOptions);
24
-    expect(navigationOptions.someKeyColor).toEqual(0xff123456);
22
+    options.someKeyColor = '#123456';
23
+    OptionsProcessor.processOptions(options);
24
+    expect(options.someKeyColor).toEqual(0xff123456);
25 25
 
26
-    navigationOptions.someKeyColor = 0x123456ff; // wut
27
-    OptionsProcessor.processOptions(navigationOptions);
28
-    expect(navigationOptions.someKeyColor).toEqual(0xff123456);
26
+    options.someKeyColor = 0x123456ff; // wut
27
+    OptionsProcessor.processOptions(options);
28
+    expect(options.someKeyColor).toEqual(0xff123456);
29 29
   });
30 30
 
31 31
   it('process colors with rgb functions', () => {
32
-    navigationOptions.someKeyColor = 'rgb(255, 0, 255)';
33
-    OptionsProcessor.processOptions(navigationOptions);
34
-    expect(navigationOptions.someKeyColor).toEqual(0xffff00ff);
32
+    options.someKeyColor = 'rgb(255, 0, 255)';
33
+    OptionsProcessor.processOptions(options);
34
+    expect(options.someKeyColor).toEqual(0xffff00ff);
35 35
   });
36 36
 
37 37
   it('process colors with special words', () => {
38
-    navigationOptions.someKeyColor = 'fuchsia';
39
-    OptionsProcessor.processOptions(navigationOptions);
40
-    expect(navigationOptions.someKeyColor).toEqual(0xffff00ff);
38
+    options.someKeyColor = 'fuchsia';
39
+    OptionsProcessor.processOptions(options);
40
+    expect(options.someKeyColor).toEqual(0xffff00ff);
41 41
   });
42 42
 
43 43
   it('process colors with hsla functions', () => {
44
-    navigationOptions.someKeyColor = 'hsla(360, 100%, 100%, 1.0)';
45
-    OptionsProcessor.processOptions(navigationOptions);
44
+    options.someKeyColor = 'hsla(360, 100%, 100%, 1.0)';
45
+    OptionsProcessor.processOptions(options);
46 46
 
47
-    expect(navigationOptions.someKeyColor).toEqual(0xffffffff);
47
+    expect(options.someKeyColor).toEqual(0xffffffff);
48 48
   });
49 49
 
50 50
   it('unknown colors return undefined', () => {
51
-    navigationOptions.someKeyColor = 'wut';
52
-    OptionsProcessor.processOptions(navigationOptions);
53
-    expect(navigationOptions.someKeyColor).toEqual(undefined);
51
+    options.someKeyColor = 'wut';
52
+    OptionsProcessor.processOptions(options);
53
+    expect(options.someKeyColor).toEqual(undefined);
54 54
   });
55 55
 
56 56
   it('any keys ending with Color', () => {
57
-    navigationOptions.otherKeyColor = 'red';
58
-    navigationOptions.yetAnotherColor = 'blue';
59
-    navigationOptions.andAnotherColor = 'rgb(0, 255, 0)';
60
-    OptionsProcessor.processOptions(navigationOptions);
61
-    expect(navigationOptions.otherKeyColor).toEqual(0xffff0000);
62
-    expect(navigationOptions.yetAnotherColor).toEqual(0xff0000ff);
63
-    expect(navigationOptions.andAnotherColor).toEqual(0xff00ff00);
57
+    options.otherKeyColor = 'red';
58
+    options.yetAnotherColor = 'blue';
59
+    options.andAnotherColor = 'rgb(0, 255, 0)';
60
+    OptionsProcessor.processOptions(options);
61
+    expect(options.otherKeyColor).toEqual(0xffff0000);
62
+    expect(options.yetAnotherColor).toEqual(0xff0000ff);
63
+    expect(options.andAnotherColor).toEqual(0xff00ff00);
64 64
   });
65 65
 
66 66
   it('keys ending with Color case sensitive', () => {
67
-    navigationOptions.otherKey_color = 'red'; // eslint-disable-line camelcase
68
-    OptionsProcessor.processOptions(navigationOptions);
69
-    expect(navigationOptions.otherKey_color).toEqual('red');
67
+    options.otherKey_color = 'red'; // eslint-disable-line camelcase
68
+    OptionsProcessor.processOptions(options);
69
+    expect(options.otherKey_color).toEqual('red');
70 70
   });
71 71
 
72 72
   it('any nested recursive keys ending with Color', () => {
73
-    navigationOptions.topBar = { textColor: 'red' };
74
-    navigationOptions.topBar.innerMostObj = { anotherColor: 'yellow' };
75
-    OptionsProcessor.processOptions(navigationOptions);
76
-    expect(navigationOptions.topBar.textColor).toEqual(0xffff0000);
77
-    expect(navigationOptions.topBar.innerMostObj.anotherColor).toEqual(0xffffff00);
73
+    options.topBar = { textColor: 'red' };
74
+    options.topBar.innerMostObj = { anotherColor: 'yellow' };
75
+    OptionsProcessor.processOptions(options);
76
+    expect(options.topBar.textColor).toEqual(0xffff0000);
77
+    expect(options.topBar.innerMostObj.anotherColor).toEqual(0xffffff00);
78 78
   });
79 79
 
80 80
   it('resolve image sources with name/ending with icon', () => {
81
-    navigationOptions.icon = 'require("https://wix.github.io/react-native-navigation/_images/logo.png");';
82
-    navigationOptions.topBar = {
81
+    options.icon = 'require("https://wix.github.io/react-native-navigation/_images/logo.png");';
82
+    options.topBar = {
83 83
       myIcon: 'require("https://wix.github.io/react-native-navigation/_images/logo.png");',
84 84
       myOtherValue: 'value'
85 85
     };
86
-    OptionsProcessor.processOptions(navigationOptions);
86
+    OptionsProcessor.processOptions(options);
87 87
 
88 88
     // As we can't import external images and we don't want to add an image here
89 89
     // I assign the icons to strings (what the require would generally look like)
90 90
     // and expect the value to be resovled, in this case it doesn't find anything and returns null
91
-    expect(navigationOptions.icon).toEqual(null);
92
-    expect(navigationOptions.topBar.myIcon).toEqual(null);
93
-    expect(navigationOptions.topBar.myOtherValue).toEqual('value');
91
+    expect(options.icon).toEqual(null);
92
+    expect(options.topBar.myIcon).toEqual(null);
93
+    expect(options.topBar.myOtherValue).toEqual('value');
94 94
   });
95 95
 
96 96
   it('processes NavigationOptions jsDoc object', () => {
97
-    navigationOptions.someKeyColor = 'rgb(255, 0, 255)';
98
-    navigationOptions.topBar = { textColor: 'red' };
99
-    navigationOptions.topBar.innerMostObj = { anotherColor: 'yellow' };
100
-    const navigationOptionsObj = new NavigationOptions(navigationOptions);
97
+    options.someKeyColor = 'rgb(255, 0, 255)';
98
+    options.topBar = { textColor: 'red' };
99
+    options.topBar.innerMostObj = { anotherColor: 'yellow' };
100
+    const navigationOptionsObj = new Options(options);
101 101
 
102 102
     OptionsProcessor.processOptions(navigationOptionsObj);
103 103
 
@@ -105,9 +105,9 @@ describe('navigation options', () => {
105 105
   });
106 106
 
107 107
   it('undefined value return undefined ', () => {
108
-    navigationOptions.someImage = undefined;
109
-    OptionsProcessor.processOptions(navigationOptions);
108
+    options.someImage = undefined;
109
+    OptionsProcessor.processOptions(options);
110 110
 
111
-    expect(navigationOptions.someImage).toEqual(undefined);
111
+    expect(options.someImage).toEqual(undefined);
112 112
   });
113 113
 });

+ 3
- 3
lib/src/params/containers/Container.js View File

@@ -1,11 +1,11 @@
1
-const NavigationOptions = require('./../options/NavigationOptions');
1
+const Options = require('./../options/Options');
2 2
 
3 3
 class Container {
4 4
   /**
5 5
    * @property {string} name The container's registered name
6 6
    * @property {Container[]} [topTabs]
7 7
    * @property {object} [passProps] props
8
-   * @property {NavigationOptions} navigationOptions
8
+   * @property {Options} options
9 9
    */
10 10
   constructor(params) {
11 11
     this.name = params.name;
@@ -14,7 +14,7 @@ class Container {
14 14
       this.topTabs = params.topTabs;
15 15
     }
16 16
     this.passProps = params.passProps;
17
-    this.navigationOptions = params.navigationOptions && new NavigationOptions(params.navigationOptions);
17
+    this.options = params.options && new Options(params.options);
18 18
   }
19 19
 }
20 20
 

+ 2
- 2
lib/src/params/containers/Container.test.js View File

@@ -6,7 +6,7 @@ const PASS_PROPS = {
6 6
 const CONTAINER = {
7 7
   name: 'myScreen',
8 8
   passProps: PASS_PROPS,
9
-  navigationOptions: {}
9
+  options: {}
10 10
 };
11 11
 const TOP_TABS_CONTAINER = {
12 12
   topTabs: [
@@ -20,7 +20,7 @@ describe('ContainerRegistry', () => {
20 20
     const uut = new Container(CONTAINER);
21 21
     expect(uut.name).toBe('myScreen');
22 22
     expect(uut.passProps).toEqual(PASS_PROPS);
23
-    expect(uut.navigationOptions).toEqual({});
23
+    expect(uut.options).toEqual({});
24 24
   });
25 25
 
26 26
   it('parses TopTabs container', () => {

lib/src/params/options/NavigationOptions.js → lib/src/params/options/Options.js View File


lib/src/params/options/NavigationOptions.test.js → lib/src/params/options/Options.test.js View File

@@ -1,4 +1,4 @@
1
-const NavigationOptions = require('./NavigationOptions');
1
+const NavigationOptions = require('./Options');
2 2
 const BottomTabs = require('./BottomTabs');
3 3
 const TopBar = require('./TopBar');
4 4
 const BottomTab = require('./BottomTab');
@@ -38,7 +38,7 @@ const NAVIGATION_OPTIONS = {
38 38
 };
39 39
 
40 40
 describe('NavigationOptions', () => {
41
-  it('parses navigationOptions correctly', () => {
41
+  it('parses options correctly', () => {
42 42
     const uut = new NavigationOptions(NAVIGATION_OPTIONS);
43 43
     expect(uut.bottomTabs).toBeInstanceOf(BottomTabs);
44 44
     expect(uut.topBar).toBeInstanceOf(TopBar);