-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
28 lines (23 loc) · 783 Bytes
/
index.ts
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
import type { ReactElement } from 'react';
import {
render as baseRender,
RenderOptions as BaseRenderOptions,
RenderResult as BaseRenderResult,
} from '@testing-library/react';
import type Query from './queries/Query';
import screen from './screen';
import * as baseQueries from './baseQueries';
export * from '@testing-library/dom';
export { cleanup, act } from '@testing-library/react';
export type { Query };
export type RenderResult = BaseRenderResult<typeof baseQueries>;
export type RenderOptions = Omit<BaseRenderOptions, 'queries'>;
export function render(
ui: ReactElement,
options?: RenderOptions,
): RenderResult {
return baseRender(ui, { ...options, queries: baseQueries });
}
export { screen };
export * from './baseQueries';
export * from './queries';