Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit ef179c4

Browse files
lewie9021bcarroll22
authored andcommitted
fix: correct return types for query methods. (#21)
Closes #20
1 parent b8e3ca8 commit ef179c4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

typings/queries.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,70 @@ import { ReactTestRenderer } from 'react-test-renderer';
22

33
import { Matcher, MatcherOptions } from './matches';
44
import { WaitForElementOptions } from './wait-for-element';
5-
import { SelectorMatcherOptions } from './query-helpers';
5+
import { NativeTestInstance, SelectorMatcherOptions } from './query-helpers';
66

77
export type QueryByBoundProp = (
88
testRenderer: ReactTestRenderer,
99
id: Matcher,
1010
options?: MatcherOptions,
11-
) => ReactTestRenderer | null;
11+
) => NativeTestInstance | null;
1212

1313
export type AllByBoundProp = (
1414
testRenderer: ReactTestRenderer,
1515
id: Matcher,
1616
options?: MatcherOptions,
17-
) => ReactTestRenderer[];
17+
) => NativeTestInstance[];
1818

1919
export type FindAllByBoundProp = (
2020
testRenderer: ReactTestRenderer,
2121
id: Matcher,
2222
options?: MatcherOptions,
23-
) => Promise<ReactTestRenderer[]>;
23+
) => Promise<NativeTestInstance[]>;
2424

2525
export type GetByBoundProp = (
2626
testRenderer: ReactTestRenderer,
2727
id: Matcher,
2828
options?: MatcherOptions,
29-
) => ReactTestRenderer;
29+
) => NativeTestInstance;
3030

3131
export type FindByBoundProp = (
3232
testRenderer: ReactTestRenderer,
3333
id: Matcher,
3434
options?: MatcherOptions,
3535
waitForElementOptions?: WaitForElementOptions,
36-
) => Promise<ReactTestRenderer>;
36+
) => Promise<NativeTestInstance>;
3737

3838
export type QueryByText = (
3939
testRenderer: ReactTestRenderer,
4040
id: Matcher,
4141
options?: SelectorMatcherOptions,
42-
) => ReactTestRenderer | null;
42+
) => NativeTestInstance | null;
4343

4444
export type AllByText = (
4545
testRenderer: ReactTestRenderer,
4646
id: Matcher,
4747
options?: SelectorMatcherOptions,
48-
) => ReactTestRenderer[];
48+
) => NativeTestInstance[];
4949

5050
export type FindAllByText = (
5151
testRenderer: ReactTestRenderer,
5252
id: Matcher,
5353
options?: MatcherOptions,
5454
waitForElementOptions?: WaitForElementOptions,
55-
) => Promise<ReactTestRenderer[]>;
55+
) => Promise<NativeTestInstance[]>;
5656

5757
export type GetByText = (
5858
testRenderer: ReactTestRenderer,
5959
id: Matcher,
6060
options?: WaitForElementOptions,
61-
) => ReactTestRenderer;
61+
) => NativeTestInstance;
6262

6363
export type FindByText = (
6464
testRenderer: ReactTestRenderer,
6565
id: Matcher,
6666
options?: MatcherOptions,
6767
waitForElementOptions?: WaitForElementOptions,
68-
) => Promise<ReactTestRenderer>;
68+
) => Promise<NativeTestInstance>;
6969

7070
export const getByHintText: GetByBoundProp;
7171
export const getByLabelText: GetByBoundProp;

0 commit comments

Comments
 (0)