@@ -17,13 +17,13 @@ class Touchable extends PureComponent<any, any> {
17
17
}
18
18
}
19
19
20
- describe ( 'Conversion' , function ( ) {
21
- it ( 'converts an MVI Cycle app into a React component' , done => {
20
+ describe ( 'Conversion' , function ( ) {
21
+ it ( 'converts an MVI Cycle app into a React component' , ( done ) => {
22
22
function main ( sources : { react : ReactSource } ) {
23
23
const inc$ = sources . react . select ( 'button' ) . events ( 'press' ) ;
24
24
const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
25
25
const vdom$ = count$ . map ( ( i : number ) =>
26
- h ( Touchable , { sel : 'button' } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] ) ,
26
+ h ( Touchable , { sel : 'button' } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] )
27
27
) ;
28
28
return { react : vdom$ } ;
29
29
}
@@ -52,13 +52,13 @@ describe('Conversion', function() {
52
52
setTimeout ( check , 150 ) ;
53
53
} ) ;
54
54
55
- it ( 'allows Symbol selectors' , done => {
55
+ it ( 'allows Symbol selectors' , ( done ) => {
56
56
function main ( sources : { react : ReactSource } ) {
57
57
const inc = Symbol ( ) ;
58
58
const inc$ = sources . react . select ( inc ) . events ( 'press' ) ;
59
59
const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
60
60
const vdom$ = count$ . map ( ( i : number ) =>
61
- h ( Touchable , { sel : inc } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] ) ,
61
+ h ( Touchable , { sel : inc } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] )
62
62
) ;
63
63
return { react : vdom$ } ;
64
64
}
@@ -87,10 +87,10 @@ describe('Conversion', function() {
87
87
setTimeout ( check , 150 ) ;
88
88
} ) ;
89
89
90
- it ( 'output React component routes props to sources.react.props()' , done => {
90
+ it ( 'output React component routes props to sources.react.props()' , ( done ) => {
91
91
function main ( sources : { react : ReactSource } ) {
92
92
sources . react . props ( ) . addListener ( {
93
- next : props => {
93
+ next : ( props ) => {
94
94
assert . strictEqual ( props . name , 'Alice' ) ;
95
95
assert . strictEqual ( props . age , 30 ) ;
96
96
done ( ) ;
@@ -99,7 +99,7 @@ describe('Conversion', function() {
99
99
100
100
return {
101
101
react : xs . of (
102
- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
102
+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
103
103
) ,
104
104
} ;
105
105
}
@@ -112,16 +112,13 @@ describe('Conversion', function() {
112
112
renderer . create ( createElement ( RootComponent , { name : 'Alice' , age : 30 } ) ) ;
113
113
} ) ;
114
114
115
- it ( 'output React component routes other sinks to handlers in props' , done => {
115
+ it ( 'output React component routes other sinks to handlers in props' , ( done ) => {
116
116
function main ( sources : { react : ReactSource } ) {
117
117
return {
118
118
react : xs . of (
119
- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
119
+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
120
120
) ,
121
- something : xs
122
- . periodic ( 200 )
123
- . mapTo ( 'yellow' )
124
- . take ( 1 ) ,
121
+ something : xs . periodic ( 200 ) . mapTo ( 'yellow' ) . take ( 1 ) ,
125
122
} ;
126
123
}
127
124
@@ -133,22 +130,22 @@ describe('Conversion', function() {
133
130
} ) ;
134
131
renderer . create (
135
132
createElement ( RootComponent , {
136
- onSomething : x => {
133
+ onSomething : ( x ) => {
137
134
assert . strictEqual ( x , 'yellow' ) ;
138
135
done ( ) ;
139
136
} ,
140
- } ) ,
137
+ } )
141
138
) ;
142
139
} ) ;
143
140
144
- it ( 'sources.react.props() evolves over time as new props come in' , done => {
141
+ it ( 'sources.react.props() evolves over time as new props come in' , ( done ) => {
145
142
function main ( sources : { react : ReactSource } ) {
146
143
let first = false ;
147
144
sources . react
148
145
. props ( )
149
146
. take ( 1 )
150
147
. addListener ( {
151
- next : props => {
148
+ next : ( props ) => {
152
149
assert . strictEqual ( props . name , 'Alice' ) ;
153
150
assert . strictEqual ( props . age , 30 ) ;
154
151
first = true ;
@@ -160,7 +157,7 @@ describe('Conversion', function() {
160
157
. drop ( 1 )
161
158
. take ( 1 )
162
159
. addListener ( {
163
- next : props => {
160
+ next : ( props ) => {
164
161
assert . strictEqual ( first , true ) ;
165
162
assert . strictEqual ( props . name , 'alice' ) ;
166
163
assert . strictEqual ( props . age , 31 ) ;
@@ -170,7 +167,7 @@ describe('Conversion', function() {
170
167
171
168
return {
172
169
react : xs . of (
173
- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
170
+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
174
171
) ,
175
172
} ;
176
173
}
@@ -181,12 +178,12 @@ describe('Conversion', function() {
181
178
return { source, sink} ;
182
179
} ) ;
183
180
const r = renderer . create (
184
- createElement ( RootComponent , { name : 'Alice' , age : 30 } ) ,
181
+ createElement ( RootComponent , { name : 'Alice' , age : 30 } )
185
182
) ;
186
183
r . update ( createElement ( RootComponent , { name : 'alice' , age : 31 } ) ) ;
187
184
} ) ;
188
185
189
- it ( 'no synchronous race conditions with handler registration' , done => {
186
+ it ( 'no synchronous race conditions with handler registration' , ( done ) => {
190
187
function main ( sources : { react : ReactSource } ) {
191
188
const inc$ = xs . create ( {
192
189
start ( listener : any ) {
@@ -201,7 +198,7 @@ describe('Conversion', function() {
201
198
} ) ;
202
199
const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
203
200
const vdom$ = count$ . map ( ( i : number ) =>
204
- h ( Touchable , { sel : 'button' } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] ) ,
201
+ h ( Touchable , { sel : 'button' } , [ h ( 'div' , [ h ( 'h1' , { } , '' + i ) ] ) ] )
205
202
) ;
206
203
return { react : vdom$ } ;
207
204
}
0 commit comments