Skip to content

Commit b761b02

Browse files
committed
fix lint
1 parent 108754f commit b761b02

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/__tests__/render-hook-async.test.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ test('rerenderAsync function updates hook asynchronously', async () => {
6262
return state;
6363
}
6464

65-
const { result, rerenderAsync } = await renderHookAsync(useTestHook, { initialProps: { value: 5 } });
65+
const { result, rerenderAsync } = await renderHookAsync(useTestHook, {
66+
initialProps: { value: 5 },
67+
});
6668
expect(result.current).toEqual(10);
6769

6870
await rerenderAsync({ value: 10 });
@@ -241,7 +243,9 @@ test('handles hook with cleanup and re-initialization', async () => {
241243
effectCount++;
242244
setValue(`${props.key}-effect`);
243245

244-
return () => { cleanupCount++; };
246+
return () => {
247+
cleanupCount++;
248+
};
245249
}, [props.key]);
246250

247251
return value;

src/render-hook.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export async function renderHookAsync<Result, Props>(
9090
return {
9191
// Result should already be set after the first render effects are run.
9292
result: result as React.RefObject<Result>,
93-
rerenderAsync: (hookProps: Props) => rerenderComponentAsync(<TestComponent hookProps={hookProps} />),
93+
rerenderAsync: (hookProps: Props) =>
94+
rerenderComponentAsync(<TestComponent hookProps={hookProps} />),
9495
unmountAsync,
9596
};
9697
}

0 commit comments

Comments
 (0)