File tree 2 files changed +18
-17
lines changed
2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 1
- import { Point } from "../point.class" ;
2
- import { Region } from "../region.class" ;
3
- import { toBeAt } from "./matchers/toBeAt.function" ;
4
- import { toBeIn } from "./matchers/toBeIn.function" ;
5
- import { toShow } from "./matchers/toShow.function" ;
6
- import { Image } from "../image.class" ;
1
+ import { Point } from "../point.class" ;
2
+ import { Region } from "../region.class" ;
3
+ import { toBeAt } from "./matchers/toBeAt.function" ;
4
+ import { toBeIn } from "./matchers/toBeIn.function" ;
5
+ import { toShow } from "./matchers/toShow.function" ;
6
+ import { FirstArgumentType } from "../typings" ;
7
+ import { ScreenClass } from "../screen.class" ;
7
8
8
9
declare global {
9
- namespace jest {
10
- interface Matchers < R > {
11
- toBeAt : ( position : Point ) => { } ;
12
- toBeIn : ( region : Region ) => { } ;
13
- toShow : ( needle : string | Image , confidence ?: number ) => { } ;
10
+ namespace jest {
11
+ interface Matchers < R > {
12
+ toBeAt : ( position : Point ) => { } ;
13
+ toBeIn : ( region : Region ) => { } ;
14
+ toShow : ( needle : FirstArgumentType < typeof ScreenClass . prototype . find > , confidence ?: number ) => { } ;
15
+ }
14
16
}
15
- }
16
17
}
17
18
18
19
export const jestMatchers = {
19
- toBeAt,
20
- toBeIn,
21
- toShow,
20
+ toBeAt,
21
+ toBeIn,
22
+ toShow,
22
23
} ;
Original file line number Diff line number Diff line change 1
1
import { LocationParameters } from "../../locationparameters.class" ;
2
2
import { ScreenClass } from "../../screen.class" ;
3
- import { Image } from "../../image.class " ;
3
+ import { FirstArgumentType } from "../../typings " ;
4
4
5
5
export const toShow = async (
6
6
received : ScreenClass ,
7
- needle : string | Image ,
7
+ needle : FirstArgumentType < typeof ScreenClass . prototype . find > ,
8
8
confidence ?: number ,
9
9
) => {
10
10
let locationParams ;
You can’t perform that action at this time.
0 commit comments