Skip to content

Commit 443834a

Browse files
committed
fix prettier
1 parent 9b3b766 commit 443834a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/__tests__/renderHook.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ test('allows rerendering', () => {
5353
test('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

7474
test('allows wrapper components', async () => {
7575
const Context = React.createContext('default')

src/pure.js

+1-1
Original file line numberDiff line numberDiff 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(

types/index.d.ts

+2-2
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)