Skip to content

Commit

Permalink
(#547) Expose new matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Dec 14, 2023
1 parent a1eb11f commit 50ef3ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/expect/jest.matcher.function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ import { toBeAt } from "./matchers/toBeAt.function";
import { toBeIn } from "./matchers/toBeIn.function";
import { toShow } from "./matchers/toShow.function";
import { FindInput } from "../screen.class";
import { RGBA } from "../rgba.class";
import { toHaveColor } from "./matchers/toHaveColor.function";
import { OptionalSearchParameters } from "../optionalsearchparameters.class";

declare global {
namespace jest {
interface Matchers<R> {
toBeAt: (position: Point) => ReturnType<typeof toBeAt>;
toBeIn: (region: Region) => ReturnType<typeof toBeIn>;
// @ts-ignore
toShow: (
toShow: <PROVIDER_DATA>(
needle: FindInput,
confidence?: number
parameters?: OptionalSearchParameters<PROVIDER_DATA>,
) => ReturnType<typeof toShow>;
toHaveColor: (color: RGBA) => ReturnType<typeof toHaveColor>;
}
}
}
Expand All @@ -23,4 +27,5 @@ export const jestMatchers = {
toBeAt,
toBeIn,
toShow,
toHaveColor,
};

0 comments on commit 50ef3ea

Please sign in to comment.