File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,17 @@ export interface EnhancerOptions {
173
173
traceLimit ?: number
174
174
}
175
175
176
+ type Compose = typeof compose
177
+
178
+ interface ComposeWithDevTools {
179
+ ( options : EnhancerOptions ) : Compose
180
+ < StoreExt > ( ...funcs : StoreEnhancer < StoreExt > [ ] ) : StoreEnhancer < StoreExt >
181
+ }
182
+
176
183
/**
177
184
* @public
178
185
*/
179
- export const composeWithDevTools : {
180
- ( options : EnhancerOptions ) : typeof compose
181
- < StoreExt > ( ...funcs : Array < StoreEnhancer < StoreExt > > ) : StoreEnhancer < StoreExt >
182
- } =
186
+ export const composeWithDevTools : ComposeWithDevTools =
183
187
typeof window !== 'undefined' &&
184
188
( window as any ) . __REDUX_DEVTOOLS_EXTENSION_COMPOSE__
185
189
? ( window as any ) . __REDUX_DEVTOOLS_EXTENSION_COMPOSE__
Original file line number Diff line number Diff line change @@ -963,15 +963,15 @@ describe('hooks tests', () => {
963
963
const unwrappedErrorResult =
964
964
screen . getByTestId ( 'unwrappedError' ) ?. textContent
965
965
966
- errorResult &&
967
- unwrappedErrorResult &&
966
+ if ( errorResult && unwrappedErrorResult ) {
968
967
expect ( JSON . parse ( errorResult ) ) . toMatchObject ( {
969
968
status : 500 ,
970
969
data : null ,
971
- } ) &&
970
+ } )
972
971
expect ( JSON . parse ( unwrappedErrorResult ) ) . toMatchObject (
973
972
JSON . parse ( errorResult )
974
973
)
974
+ }
975
975
} )
976
976
977
977
expect ( screen . getByTestId ( 'result' ) . textContent ) . toBe ( '' )
@@ -1015,14 +1015,14 @@ describe('hooks tests', () => {
1015
1015
const unwrappedDataResult =
1016
1016
screen . getByTestId ( 'unwrappedResult' ) ?. textContent
1017
1017
1018
- dataResult &&
1019
- unwrappedDataResult &&
1018
+ if ( dataResult && unwrappedDataResult ) {
1020
1019
expect ( JSON . parse ( dataResult ) ) . toMatchObject ( {
1021
1020
name : 'Timmy' ,
1022
- } ) &&
1021
+ } )
1023
1022
expect ( JSON . parse ( unwrappedDataResult ) ) . toMatchObject (
1024
1023
JSON . parse ( dataResult )
1025
1024
)
1025
+ }
1026
1026
} )
1027
1027
1028
1028
expect ( screen . getByTestId ( 'error' ) . textContent ) . toBe ( '' )
You can’t perform that action at this time.
0 commit comments