Skip to content

Commit 50ef3ea

Browse files
committed
(#547) Expose new matchers
1 parent a1eb11f commit 50ef3ea

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎lib/expect/jest.matcher.function.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@ import { toBeAt } from "./matchers/toBeAt.function";
44
import { toBeIn } from "./matchers/toBeIn.function";
55
import { toShow } from "./matchers/toShow.function";
66
import { FindInput } from "../screen.class";
7+
import { RGBA } from "../rgba.class";
8+
import { toHaveColor } from "./matchers/toHaveColor.function";
9+
import { OptionalSearchParameters } from "../optionalsearchparameters.class";
710

811
declare global {
912
namespace jest {
1013
interface Matchers<R> {
1114
toBeAt: (position: Point) => ReturnType<typeof toBeAt>;
1215
toBeIn: (region: Region) => ReturnType<typeof toBeIn>;
1316
// @ts-ignore
14-
toShow: (
17+
toShow: <PROVIDER_DATA>(
1518
needle: FindInput,
16-
confidence?: number
19+
parameters?: OptionalSearchParameters<PROVIDER_DATA>,
1720
) => ReturnType<typeof toShow>;
21+
toHaveColor: (color: RGBA) => ReturnType<typeof toHaveColor>;
1822
}
1923
}
2024
}
@@ -23,4 +27,5 @@ export const jestMatchers = {
2327
toBeAt,
2428
toBeIn,
2529
toShow,
30+
toHaveColor,
2631
};

0 commit comments

Comments
 (0)