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

Function getInputByTestId

test/browser/fixtures/expect-dom/utils.ts:19–19  ·  view source on GitHub ↗
(testId: string)

Source from the content-addressed store, hash-verified

17 const asFragment = () =>
18 document.createRange().createContextualFragment(container.innerHTML)
19 const getInputByTestId = (testId: string) => queryByTestId(testId) as HTMLInputElement
20
21 // Some tests need to look up global ids with document.getElementById()
22 // so we need to be inside an actual document.

Calls 1

queryByTestIdFunction · 0.85

Tested by

no test coverage detected