MCPcopy
hub / github.com/vitest-dev/vitest / toContainElement

Method toContainElement

packages/browser/jest-dom.d.ts:210–210  ·  view source on GitHub ↗

* @description * Allows you to assert whether an element contains another element as a descendant or not. * @example * <span data-testid="ancestor"> * <span data-testid="descendant"></span> * </span> * * const ancestor = page.getByTestId('ancestor') * const descendant = pag

(element: HTMLElement | SVGElement | Locator | null)

Source from the content-addressed store, hash-verified

208 * @see https://vitest.dev/api/browser/assertions#tocontainelement
209 */
210 toContainElement(element: HTMLElement | SVGElement | Locator | null): R
211 /**
212 * @description
213 * Assert whether a string representing a HTML element is contained in another element.

Calls

no outgoing calls

Tested by

no test coverage detected