File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ test('allows rerendering', () => {
5353test ( 'allows setting a displayName' , ( ) => {
5454 let capturedElement = null
5555
56- const spyWrapper = ( { children } ) => {
56+ const spyWrapper = ( { children} ) => {
5757 // Capture the hook element React creates
58- capturedElement = React . Children . only ( children ) ;
59- return < > { children } </ > ;
58+ capturedElement = React . Children . only ( children )
59+ return < > { children } </ >
6060 }
6161
6262 const useMyLocalHook = jest . fn ( )
@@ -67,9 +67,9 @@ test('allows setting a displayName', () => {
6767 } )
6868
6969 expect ( useMyLocalHook ) . toHaveBeenCalledTimes ( 1 )
70-
70+
7171 expect ( capturedElement ?. type ?. displayName ) . toBe ( 'CustomHookDisplayName' )
72- } ) ;
72+ } )
7373
7474test ( 'allows wrapper components' , async ( ) => {
7575 const Context = React . createContext ( 'default' )
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ function renderHook(renderCallback, options = {}) {
343343 }
344344
345345 if ( displayName !== undefined ) {
346- TestComponent . displayName = displayName ;
346+ TestComponent . displayName = displayName
347347 }
348348
349349 const { rerender : baseRerender , unmount} = render (
Original file line number Diff line number Diff line change @@ -253,8 +253,8 @@ export interface RenderHookOptions<
253253 * The argument passed to the renderHook callback. Can be useful if you plan
254254 * to use the rerender utility to change the values passed to your hook.
255255 */
256- initialProps ?: Props | undefined ,
257- displayName ?: React . FunctionComponent [ 'displayName' ] ,
256+ initialProps ?: Props | undefined
257+ displayName ?: React . FunctionComponent [ 'displayName' ]
258258}
259259
260260/**
You can’t perform that action at this time.
0 commit comments