@@ -17,13 +17,13 @@ class Touchable extends PureComponent<any, any> {
1717 }
1818}
1919
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 ) => {
2222 function main ( sources : { react : ReactSource } ) {
2323 const inc$ = sources . react . select ( 'button' ) . events ( 'press' ) ;
2424 const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
2525 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 ) ] ) ] )
2727 ) ;
2828 return { react : vdom$ } ;
2929 }
@@ -52,13 +52,13 @@ describe('Conversion', function() {
5252 setTimeout ( check , 150 ) ;
5353 } ) ;
5454
55- it ( 'allows Symbol selectors' , done => {
55+ it ( 'allows Symbol selectors' , ( done ) => {
5656 function main ( sources : { react : ReactSource } ) {
5757 const inc = Symbol ( ) ;
5858 const inc$ = sources . react . select ( inc ) . events ( 'press' ) ;
5959 const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
6060 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 ) ] ) ] )
6262 ) ;
6363 return { react : vdom$ } ;
6464 }
@@ -87,10 +87,10 @@ describe('Conversion', function() {
8787 setTimeout ( check , 150 ) ;
8888 } ) ;
8989
90- it ( 'output React component routes props to sources.react.props()' , done => {
90+ it ( 'output React component routes props to sources.react.props()' , ( done ) => {
9191 function main ( sources : { react : ReactSource } ) {
9292 sources . react . props ( ) . addListener ( {
93- next : props => {
93+ next : ( props ) => {
9494 assert . strictEqual ( props . name , 'Alice' ) ;
9595 assert . strictEqual ( props . age , 30 ) ;
9696 done ( ) ;
@@ -99,7 +99,7 @@ describe('Conversion', function() {
9999
100100 return {
101101 react : xs . of (
102- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
102+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
103103 ) ,
104104 } ;
105105 }
@@ -112,16 +112,13 @@ describe('Conversion', function() {
112112 renderer . create ( createElement ( RootComponent , { name : 'Alice' , age : 30 } ) ) ;
113113 } ) ;
114114
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 ) => {
116116 function main ( sources : { react : ReactSource } ) {
117117 return {
118118 react : xs . of (
119- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
119+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
120120 ) ,
121- something : xs
122- . periodic ( 200 )
123- . mapTo ( 'yellow' )
124- . take ( 1 ) ,
121+ something : xs . periodic ( 200 ) . mapTo ( 'yellow' ) . take ( 1 ) ,
125122 } ;
126123 }
127124
@@ -133,22 +130,22 @@ describe('Conversion', function() {
133130 } ) ;
134131 renderer . create (
135132 createElement ( RootComponent , {
136- onSomething : x => {
133+ onSomething : ( x ) => {
137134 assert . strictEqual ( x , 'yellow' ) ;
138135 done ( ) ;
139136 } ,
140- } ) ,
137+ } )
141138 ) ;
142139 } ) ;
143140
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 ) => {
145142 function main ( sources : { react : ReactSource } ) {
146143 let first = false ;
147144 sources . react
148145 . props ( )
149146 . take ( 1 )
150147 . addListener ( {
151- next : props => {
148+ next : ( props ) => {
152149 assert . strictEqual ( props . name , 'Alice' ) ;
153150 assert . strictEqual ( props . age , 30 ) ;
154151 first = true ;
@@ -160,7 +157,7 @@ describe('Conversion', function() {
160157 . drop ( 1 )
161158 . take ( 1 )
162159 . addListener ( {
163- next : props => {
160+ next : ( props ) => {
164161 assert . strictEqual ( first , true ) ;
165162 assert . strictEqual ( props . name , 'alice' ) ;
166163 assert . strictEqual ( props . age , 31 ) ;
@@ -170,7 +167,7 @@ describe('Conversion', function() {
170167
171168 return {
172169 react : xs . of (
173- h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] ) ,
170+ h ( 'section' , [ h ( 'div' , { } , [ h ( 'h1' , { } , 'Hello world' ) ] ) ] )
174171 ) ,
175172 } ;
176173 }
@@ -181,12 +178,12 @@ describe('Conversion', function() {
181178 return { source, sink} ;
182179 } ) ;
183180 const r = renderer . create (
184- createElement ( RootComponent , { name : 'Alice' , age : 30 } ) ,
181+ createElement ( RootComponent , { name : 'Alice' , age : 30 } )
185182 ) ;
186183 r . update ( createElement ( RootComponent , { name : 'alice' , age : 31 } ) ) ;
187184 } ) ;
188185
189- it ( 'no synchronous race conditions with handler registration' , done => {
186+ it ( 'no synchronous race conditions with handler registration' , ( done ) => {
190187 function main ( sources : { react : ReactSource } ) {
191188 const inc$ = xs . create ( {
192189 start ( listener : any ) {
@@ -201,7 +198,7 @@ describe('Conversion', function() {
201198 } ) ;
202199 const count$ = inc$ . fold ( ( acc : number , x : any ) => acc + 1 , 0 ) ;
203200 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 ) ] ) ] )
205202 ) ;
206203 return { react : vdom$ } ;
207204 }
0 commit comments