MCPcopy
hub / github.com/testing-library/dom-testing-library / getMultipleElementsFoundError

Function getMultipleElementsFoundError

src/query-helpers.ts:19–27  ·  view source on GitHub ↗
(
  message: string,
  container: HTMLElement,
)

Source from the content-addressed store, hash-verified

17}
18
19function getMultipleElementsFoundError(
20 message: string,
21 container: HTMLElement,
22) {
23 return getElementError(
24 `${message}\n\n(If this is intentional, then use the \`*AllBy*\` variant of the query (like \`queryAllByText\`, \`getAllByText\`, or \`findAllByText\`)).`,
25 container,
26 )
27}
28
29function queryAllByAttribute(
30 attribute: string,

Callers 2

queryByAttributeFunction · 0.85
makeSingleQueryFunction · 0.85

Calls 1

getElementErrorFunction · 0.70

Tested by

no test coverage detected