@@ -13,7 +13,6 @@ import ImmutableVirtualizedList from './ImmutableVirtualizedList';
13
13
* @see https://facebook.github.io/react-native/docs/listviewdatasource.html#constructor
14
14
*/
15
15
const data = {
16
-
17
16
EMPTY_DATA : Immutable . List ( ) ,
18
17
19
18
LIST_DATA : Immutable . List ( [
@@ -64,11 +63,9 @@ const data = {
64
63
] ) ,
65
64
66
65
RANGE_DATA : Immutable . Range ( 3 , 10 , 3 ) ,
67
-
68
66
} ;
69
67
70
68
const renderers = {
71
-
72
69
/**
73
70
* @param {* } rowData
74
71
*/
@@ -88,11 +85,9 @@ const renderers = {
88
85
renderSectionHeader ( sectionData , category ) {
89
86
return < Text header > { `${ category } (${ sectionData . size } items)` } </ Text > ;
90
87
} ,
91
-
92
88
} ;
93
89
94
90
const mocks = {
95
-
96
91
/**
97
92
* Mock ScrollView so that it doesn't contain any props when rendered by ListView.
98
93
* This is useful for comparison between ListView and ImmutableListView.
@@ -103,17 +98,15 @@ const mocks = {
103
98
jest . resetModules ( ) ;
104
99
105
100
// eslint-disable-next-line react/prop-types
106
- const mockScrollView = ( props ) => React . createElement ( 'ScrollView' , { } , props . children ) ;
101
+ const mockScrollView = ( { children } ) => React . createElement ( 'ScrollView' , { } , children ) ;
107
102
jest . doMock ( 'ScrollView' , ( ) => mockScrollView ) ;
108
103
109
104
// eslint-disable-next-line global-require
110
105
return require ( './ImmutableListView' ) . default ;
111
106
} ,
112
-
113
107
} ;
114
108
115
109
const expectors = {
116
-
117
110
expectToMatchSnapshotWithData ( immutableData , shouldRenderSectionHeaders ) {
118
111
const renderSectionHeaderProps = shouldRenderSectionHeaders
119
112
? { renderSectionHeader : renderers . renderSectionHeader }
@@ -171,7 +164,6 @@ const expectors = {
171
164
172
165
expect ( immutableTree ) . toEqual ( regularTree ) ;
173
166
} ,
174
-
175
167
} ;
176
168
177
169
export {
0 commit comments