@@ -115,7 +115,11 @@ test('browser plugin integration test withRPCRedux and options', async t => {
115115 const body : string = options . body ;
116116
117117 t . equal ( url , '/api/test' , 'fetches to expected url' ) ;
118- t . deepLooseEqual ( JSON . parse ( body ) , { arg : 1 , state : 2 , prop : 3 } , 'sends correct body' ) ;
118+ t . deepLooseEqual (
119+ JSON . parse ( body ) ,
120+ { arg : 1 , state : 2 , prop : 3 } ,
121+ 'sends correct body'
122+ ) ;
119123 t . equal ( options . method , 'POST' , 'makes POST request' ) ;
120124 return Promise . resolve (
121125 new Response (
@@ -134,17 +138,20 @@ test('browser plugin integration test withRPCRedux and options', async t => {
134138 { type : / T E S T _ S T A R T / , payload : { arg : 1 , state : 2 , prop : 3 } } ,
135139 { type : / T E S T _ S U C C E S S / , payload : { a : 'b' } } ,
136140 ] ;
137- const store = createStore ( ( state , action ) => {
138- const fixture = expectedActions . shift ( ) ;
139- t . ok ( fixture . type . test ( action . type ) , 'dispatches expected action type' ) ;
140- t . deepLooseEqual (
141- action . payload ,
142- // $FlowFixMe
143- fixture . payload ,
144- 'dispatches expected action payload'
145- ) ;
146- return { ...state , ...action . payload } ;
147- } , { state : 2 } ) ;
141+ const store = createStore (
142+ ( state , action ) => {
143+ const fixture = expectedActions . shift ( ) ;
144+ t . ok ( fixture . type . test ( action . type ) , 'dispatches expected action type' ) ;
145+ t . deepLooseEqual (
146+ action . payload ,
147+ // $FlowFixMe
148+ fixture . payload ,
149+ 'dispatches expected action payload'
150+ ) ;
151+ return { ...state , ...action . payload } ;
152+ } ,
153+ { state : 2 }
154+ ) ;
148155
149156 const Component = props => {
150157 t . equal ( typeof props . test , 'function' , 'passes correct prop to component' ) ;
@@ -158,9 +165,7 @@ test('browser plugin integration test withRPCRedux and options', async t => {
158165 const withTest = compose (
159166 withRPCRedux ( 'test' , { mapStateToParams} ) ,
160167 connect ( s => s ) ,
161- prepared ( props =>
162- props . a ? Promise . resolve ( ) : props . test ( { arg : 1 } )
163- )
168+ prepared ( props => ( props . a ? Promise . resolve ( ) : props . test ( { arg : 1 } ) ) )
164169 ) ( Component ) ;
165170
166171 const element = React . createElement (
0 commit comments