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

Method toContainHTML

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

* @description * Assert whether a string representing a HTML element is contained in another element. * @example * <span data-testid="parent"><span data-testid="child"></span></span> * * const parent = page.getByTestId('parent') * await expect.element(parent).toContainHTML('<span d

(htmlText: string)

Source from the content-addressed store, hash-verified

219 * @see https://vitest.dev/api/browser/assertions#tocontainhtml
220 */
221 toContainHTML(htmlText: string): R
222 /**
223 * @description
224 * Allows you to check if a given element has an attribute or not.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected