File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ test('allows rerendering', () => {
53
53
test ( 'allows setting a displayName' , ( ) => {
54
54
let capturedElement = null
55
55
56
- const spyWrapper = ( { children } ) => {
56
+ const spyWrapper = ( { children} ) => {
57
57
// Capture the hook element React creates
58
- capturedElement = React . Children . only ( children ) ;
59
- return < > { children } </ > ;
58
+ capturedElement = React . Children . only ( children )
59
+ return < > { children } </ >
60
60
}
61
61
62
62
const useMyLocalHook = jest . fn ( )
@@ -67,9 +67,9 @@ test('allows setting a displayName', () => {
67
67
} )
68
68
69
69
expect ( useMyLocalHook ) . toHaveBeenCalledTimes ( 1 )
70
-
70
+
71
71
expect ( capturedElement ?. type ?. displayName ) . toBe ( 'CustomHookDisplayName' )
72
- } ) ;
72
+ } )
73
73
74
74
test ( 'allows wrapper components' , async ( ) => {
75
75
const Context = React . createContext ( 'default' )
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ function renderHook(renderCallback, options = {}) {
343
343
}
344
344
345
345
if ( displayName !== undefined ) {
346
- TestComponent . displayName = displayName ;
346
+ TestComponent . displayName = displayName
347
347
}
348
348
349
349
const { rerender : baseRerender , unmount} = render (
Original file line number Diff line number Diff line change @@ -253,8 +253,8 @@ export interface RenderHookOptions<
253
253
* The argument passed to the renderHook callback. Can be useful if you plan
254
254
* to use the rerender utility to change the values passed to your hook.
255
255
*/
256
- initialProps ?: Props | undefined ,
257
- displayName ?: React . FunctionComponent [ 'displayName' ] ,
256
+ initialProps ?: Props | undefined
257
+ displayName ?: React . FunctionComponent [ 'displayName' ]
258
258
}
259
259
260
260
/**
You can’t perform that action at this time.
0 commit comments