export interface TestingLibraryMatchers extends Record {
/**
* @deprecated
* since v1.9.0
* @description
* Assert whether a value is a DOM element, or not. Contrary to what its name implies, this matcher only checks
* that you passed to it a valid DOM element.
*
* It does not have a clear definition of what "the DOM" is. Therefore, it does not check whether that element
* is contained anywhere.
* @see
* [testing-library/jest-dom#toBeInTheDom](https://github.com/testing-library/jest-dom#toBeInTheDom)
*/
toBeInTheDOM(container?: HTMLElement | SVGElement): R;
/**
* @description
* Assert whether an element is present in the document or not.
* @example
*
*
* expect(queryByTestId('svg-element')).toBeInTheDocument()
* expect(queryByTestId('does-not-exist')).not.toBeInTheDocument()
* @see
* [testing-library/jest-dom#tobeinthedocument](https://github.com/testing-library/jest-dom#tobeinthedocument)
*/
toBeInTheDocument(): R;
/**
* @description
* This allows you to check if an element is currently visible to the user.
*
* An element is visible if **all** the following conditions are met:
* * it does not have its css property display set to none
* * it does not have its css property visibility set to either hidden or collapse
* * it does not have its css property opacity set to 0
* * its parent element is also visible (and so on up to the top of the DOM tree)
* * it does not have the hidden attribute
* * if `` it has the open attribute
* @example
*
* Zero Opacity
*
*
*
Visible Example
*
* expect(getByTestId('zero-opacity')).not.toBeVisible()
* expect(getByTestId('visible')).toBeVisible()
* @see
* [testing-library/jest-dom#tobevisible](https://github.com/testing-library/jest-dom#tobevisible)
*/
toBeVisible(): R;
/**
* @deprecated
* since v5.9.0
* @description
* Assert whether an element has content or not.
* @example
*
*
*
*
* expect(getByTestId('empty')).toBeEmpty()
* expect(getByTestId('not-empty')).not.toBeEmpty()
* @see
* [testing-library/jest-dom#tobeempty](https://github.com/testing-library/jest-dom#tobeempty)
*/
toBeEmpty(): R;
/**
* @description
* Assert whether an element has content or not.
* @example
*
*
*
*
* expect(getByTestId('empty')).toBeEmptyDOMElement()
* expect(getByTestId('not-empty')).not.toBeEmptyDOMElement()
* @see
* [testing-library/jest-dom#tobeemptydomelement](https://github.com/testing-library/jest-dom#tobeemptydomelement)
*/
toBeEmptyDOMElement(): R;
/**
* @description
* Allows you to check whether an element is disabled from the user's perspective.
*
* Matches if the element is a form control and the `disabled` attribute is specified on this element or the
* element is a descendant of a form element with a `disabled` attribute.
* @example
*
*
* expect(getByTestId('button')).toBeDisabled()
* @see
* [testing-library/jest-dom#tobedisabled](https://github.com/testing-library/jest-dom#tobedisabled)
*/
toBeDisabled(): R;
/**
* @description
* Allows you to check whether an element is not disabled from the user's perspective.
*
* Works like `not.toBeDisabled()`.
*
* Use this matcher to avoid double negation in your tests.
* @example
*
*
* expect(getByTestId('button')).toBeEnabled()
* @see
* [testing-library/jest-dom#tobeenabled](https://github.com/testing-library/jest-dom#tobeenabled)
*/
toBeEnabled(): R;
/**
* @description
* Check if a form element, or the entire `form`, is currently invalid.
*
* An `input`, `select`, `textarea`, or `form` element is invalid if it has an `aria-invalid` attribute with no
* value or a value of "true", or if the result of `checkValidity()` is false.
* @example
*
*
*
*
* expect(getByTestId('no-aria-invalid')).not.toBeInvalid()
* expect(getByTestId('invalid-form')).toBeInvalid()
* @see
* [testing-library/jest-dom#tobeinvalid](https://github.com/testing-library/jest-dom#tobeinvalid)
*/
toBeInvalid(): R;
/**
* @description
* This allows you to check if a form element is currently required.
*
* An element is required if it is having a `required` or `aria-required="true"` attribute.
* @example
*
*
*
* expect(getByTestId('required-input')).toBeRequired()
* expect(getByTestId('supported-role')).not.toBeRequired()
* @see
* [testing-library/jest-dom#toberequired](https://github.com/testing-library/jest-dom#toberequired)
*/
toBeRequired(): R;
/**
* @description
* Allows you to check if a form element is currently required.
*
* An `input`, `select`, `textarea`, or `form` element is invalid if it has an `aria-invalid` attribute with no
* value or a value of "false", or if the result of `checkValidity()` is true.
* @example
*
*
*
*
* expect(getByTestId('no-aria-invalid')).not.toBeValid()
* expect(getByTestId('invalid-form')).toBeInvalid()
* @see
* [testing-library/jest-dom#tobevalid](https://github.com/testing-library/jest-dom#tobevalid)
*/
toBeValid(): R;
/**
* @description
* Allows you to assert whether an element contains another element as a descendant or not.
* @example
*
*
*
*
* const ancestor = getByTestId('ancestor')
* const descendant = getByTestId('descendant')
* const nonExistantElement = getByTestId('does-not-exist')
* expect(ancestor).toContainElement(descendant)
* expect(descendant).not.toContainElement(ancestor)
* expect(ancestor).not.toContainElement(nonExistantElement)
* @see
* [testing-library/jest-dom#tocontainelement](https://github.com/testing-library/jest-dom#tocontainelement)
*/
toContainElement(element: HTMLElement | SVGElement | null): R;
/**
* @description
* Assert whether a string representing a HTML element is contained in another element.
* @example
*
*
* expect(getByTestId('parent')).toContainHTML('')
* @see
* [testing-library/jest-dom#tocontainhtml](https://github.com/testing-library/jest-dom#tocontainhtml)
*/
toContainHTML(htmlText: string): R;
/**
* @description
* Allows you to check if a given element has an attribute or not.
*
* You can also optionally check that the attribute has a specific expected value or partial match using
* [expect.stringContaining](https://jestjs.io/docs/en/expect.html#expectnotstringcontainingstring) or
* [expect.stringMatching](https://jestjs.io/docs/en/expect.html#expectstringmatchingstring-regexp).
* @example
*
*
* expect(button).toHaveAttribute('disabled')
* expect(button).toHaveAttribute('type', 'submit')
* expect(button).not.toHaveAttribute('type', 'button')
* @see
* [testing-library/jest-dom#tohaveattribute](https://github.com/testing-library/jest-dom#tohaveattribute)
*/
toHaveAttribute(attr: string, value?: unknown): R;
/**
* @description
* Check whether the given element has certain classes within its `class` attribute.
*
* You must provide at least one class, unless you are asserting that an element does not have any classes.
* @example
*
*
*
no classes
*
* const deleteButton = getByTestId('delete-button')
* const noClasses = getByTestId('no-classes')
* expect(deleteButton).toHaveClass('btn')
* expect(deleteButton).toHaveClass('btn-danger xs')
* expect(deleteButton).toHaveClass('btn xs btn-danger', {exact: true})
* expect(deleteButton).not.toHaveClass('btn xs btn-danger', {exact: true})
* expect(noClasses).not.toHaveClass()
* @see
* [testing-library/jest-dom#tohaveclass](https://github.com/testing-library/jest-dom#tohaveclass)
*/
toHaveClass(...classNames: string[]): R;
toHaveClass(classNames: string, options?: { exact: boolean }): R;
/**
* @description
* This allows you to check whether the given form element has the specified displayed value (the one the
* end user will see). It accepts ,
*
*
*
* expect(getByTestId('img-alt')).toHaveAccessibleName('Test alt')
* expect(getByTestId('img-empty-alt')).not.toHaveAccessibleName()
* expect(getByTestId('svg-title')).toHaveAccessibleName('Test title')
* expect(getByTestId('button-img-alt')).toHaveAccessibleName()
* expect(getByTestId('img-paragraph')).not.toHaveAccessibleName()
* expect(getByTestId('svg-button')).toHaveAccessibleName()
* expect(getByTestId('svg-without-title')).not.toHaveAccessibleName()
* expect(getByTestId('input-title')).toHaveAccessibleName()
* @see
* [testing-library/jest-dom#tohaveaccessiblename](https://github.com/testing-library/jest-dom#tohaveaccessiblename)
*/
toHaveAccessibleName(text?: string | RegExp | E): R;
/**
* @description
* This allows you to check whether the given element is partially checked.
* It accepts an input of type checkbox and elements with a role of checkbox
* with a aria-checked="mixed", or input of type checkbox with indeterminate
* set to true
*
* @example
*
*
*
*
*
*
*
* const ariaCheckboxMixed = getByTestId('aria-checkbox-mixed')
* const inputCheckboxChecked = getByTestId('input-checkbox-checked')
* const inputCheckboxUnchecked = getByTestId('input-checkbox-unchecked')
* const ariaCheckboxChecked = getByTestId('aria-checkbox-checked')
* const ariaCheckboxUnchecked = getByTestId('aria-checkbox-unchecked')
* const inputCheckboxIndeterminate = getByTestId('input-checkbox-indeterminate')
*
* expect(ariaCheckboxMixed).toBePartiallyChecked()
* expect(inputCheckboxChecked).not.toBePartiallyChecked()
* expect(inputCheckboxUnchecked).not.toBePartiallyChecked()
* expect(ariaCheckboxChecked).not.toBePartiallyChecked()
* expect(ariaCheckboxUnchecked).not.toBePartiallyChecked()
*
* inputCheckboxIndeterminate.indeterminate = true
* expect(inputCheckboxIndeterminate).toBePartiallyChecked()
* @see
* [testing-library/jest-dom#tobepartiallychecked](https://github.com/testing-library/jest-dom#tobepartiallychecked)
*/
toBePartiallyChecked(): R;
/**
* @description
*
* Check whether the given element has an [ARIA error message](https://www.w3.org/TR/wai-aria/#aria-errormessage) or not.
*
* Use the `aria-errormessage` attribute to reference another element that contains
* custom error message text. Multiple ids is **NOT** allowed. Authors MUST use
* `aria-invalid` in conjunction with `aria-errormessage`. Learn more from the
* [`aria-errormessage` spec](https://www.w3.org/TR/wai-aria/#aria-errormessage).
*
* Whitespace is normalized.
*
* When a `string` argument is passed through, it will perform a whole
* case-sensitive match to the error message text.
*
* To perform a case-insensitive match, you can use a `RegExp` with the `/i`
* modifier.
*
* To perform a partial match, you can pass a `RegExp` or use
* expect.stringContaining("partial string")`.
*
* @example
*
*
*
* Invalid time: the time must be between 9:00 AM and 5:00 PM"
*
*
*
* const timeInput = getByLabel('startTime')
*
* expect(timeInput).toHaveErrorMessage(
* 'Invalid time: the time must be between 9:00 AM and 5:00 PM',
* )
* expect(timeInput).toHaveErrorMessage(/invalid time/i) // to partially match
* expect(timeInput).toHaveErrorMessage(expect.stringContaining('Invalid time')) // to partially match
* expect(timeInput).not.toHaveErrorMessage('Pikachu!')
* @see
* [testing-library/jest-dom#tohaveerrormessage](https://github.com/testing-library/jest-dom#tohaveerrormessage)
*/
toHaveErrorMessage(text?: string | RegExp | E): R;
}
declare const matchers: TestingLibraryMatchers;
export default matchers;