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

Method toBeInTheDocument

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

* @description * Assert whether an element is present in the document or not. * @example * <svg data-testid="svg-element"></svg> * * await expect.element(page.getByTestId('svg-element')).toBeInTheDocument() * await expect.element(page.getByTestId('does-not-exist')).not.toBeInTheDoc

()

Source from the content-addressed store, hash-verified

15 * @see https://vitest.dev/api/browser/assertions#tobeinthedocument
16 */
17 toBeInTheDocument(): R
18 /**
19 * @description
20 * Assert whether an element is within the viewport or not.

Calls

no outgoing calls

Tested by

no test coverage detected