-
Notifications
You must be signed in to change notification settings - Fork 560
Expand file tree
/
Copy pathtypes.ts
More file actions
39 lines (35 loc) · 1.01 KB
/
types.ts
File metadata and controls
39 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import type {
queries,
RenderOptions as TLRenderOptions,
RenderResult as TLRenderResult,
} from "@testing-library/react";
import type {
RenderHookOptions as TLLegacyRenderHookOptions,
RenderHookResult as TLLegacyRenderHookResult,
} from "@testing-library/react-hooks";
import type {
RenderHookOptions as TLActualRenderHookOptions,
RenderHookResult as TLActualRenderHookResult,
} from "@testing-library/react-13";
export type RenderOptions = Omit<TLRenderOptions, "queries" | "wrapper"> & {
strict?: boolean;
};
export type RenderResult<
P extends React.HTMLAttributes<T>,
T extends HTMLElement
> = TLRenderResult<typeof queries> & {
setProps(props: P): RenderResult<P, T>;
forceUpdate(): RenderResult<P, T>;
};
export type RenderHookOptions<TProps> = Omit<
TLLegacyRenderHookOptions<TProps> &
TLActualRenderHookOptions<TProps> & {
strict?: boolean;
},
"wrapper"
>;
export type RenderHookResult<TResult, TProps> = TLLegacyRenderHookResult<
TProps,
TResult
> &
TLActualRenderHookResult<TResult, TProps>;