diff --git a/typings/index.d.ts b/typings/index.d.ts index f6b18831..eec3f135 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2,13 +2,14 @@ import {Simulate as ReactSimulate} from 'react-dom/test-utils' type TextMatchFunction = (content: string, element: HTMLElement) => boolean type TextMatch = string | RegExp | TextMatchFunction +type ExactTextMatch = string | RegExp | TextMatchFunction interface RenderResult { container: HTMLDivElement rerender: (ui: React.ReactElement) => void unmount: VoidFunction - queryByTestId: (id: TextMatch) => HTMLElement | null - getByTestId: (id: TextMatch) => HTMLElement + queryByTestId: (id: ExactTextMatch) => HTMLElement | null + getByTestId: (id: ExactTextMatch) => HTMLElement queryByText: (id: TextMatch) => HTMLElement | null getByText: (text: TextMatch) => HTMLElement queryByPlaceholderText: (id: TextMatch) => HTMLElement | null