Skip to content

Commit b112bcf

Browse files
committed
apply prettier
1 parent 5a4f130 commit b112bcf

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

src/testing/internal/profile/profile.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@ export function createProfiler<Snapshot extends ValidSnapshot = void>({
219219
});
220220

221221
const snapshot = snapshotRef.current as Snapshot;
222-
const domSnapshot = snapshotDOM
223-
? window.document.body.innerHTML
224-
: undefined;
222+
const domSnapshot =
223+
snapshotDOM ? window.document.body.innerHTML : undefined;
225224
const render = new RenderInstance(
226225
baseRender,
227226
snapshot,
@@ -374,13 +373,13 @@ type ResultReplaceRenderWithSnapshot<T> =
374373
: T;
375374

376375
type ProfiledHookFields<ReturnValue> =
377-
ProfiledComponentFields<ReturnValue> extends infer PC
378-
? {
379-
[K in keyof PC as StringReplaceRenderWithSnapshot<
380-
K & string
381-
>]: ResultReplaceRenderWithSnapshot<PC[K]>;
382-
}
383-
: never;
376+
ProfiledComponentFields<ReturnValue> extends infer PC ?
377+
{
378+
[K in keyof PC as StringReplaceRenderWithSnapshot<
379+
K & string
380+
>]: ResultReplaceRenderWithSnapshot<PC[K]>;
381+
}
382+
: never;
384383

385384
/** @internal */
386385
export interface ProfiledHook<Props, ReturnValue>

src/testing/matchers/index.d.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,20 @@ interface ApolloCustomMatchers<R = void, T = {}> {
3030
) => R
3131
: { error: "matcher needs to be called on an ApolloClient instance" };
3232

33-
toRerender: T extends
34-
| Profiler<any, any>
35-
| ProfiledComponent<any, any>
36-
| ProfiledHook<any, any>
37-
? (options?: NextRenderOptions) => Promise<R>
38-
: { error: "matcher needs to be called on a ProfiledComponent instance" };
33+
toRerender: T extends (
34+
Profiler<any, any> | ProfiledComponent<any, any> | ProfiledHook<any, any>
35+
) ?
36+
(options?: NextRenderOptions) => Promise<R>
37+
: { error: "matcher needs to be called on a ProfiledComponent instance" };
3938

40-
toRenderExactlyTimes: T extends
41-
| Profiler<any, any>
42-
| ProfiledComponent<any, any>
43-
| ProfiledHook<any, any>
44-
? (count: number, options?: NextRenderOptions) => Promise<R>
45-
: { error: "matcher needs to be called on a ProfiledComponent instance" };
39+
toRenderExactlyTimes: T extends (
40+
Profiler<any, any> | ProfiledComponent<any, any> | ProfiledHook<any, any>
41+
) ?
42+
(count: number, options?: NextRenderOptions) => Promise<R>
43+
: { error: "matcher needs to be called on a ProfiledComponent instance" };
4644

47-
toBeGarbageCollected: T extends WeakRef<any>
48-
? () => Promise<R>
49-
: { error: "matcher needs to be called on a WeakRef instance" };
45+
toBeGarbageCollected: T extends WeakRef<any> ? () => Promise<R>
46+
: { error: "matcher needs to be called on a WeakRef instance" };
5047
}
5148

5249
declare global {

0 commit comments

Comments
 (0)