MCPcopy Create free account
hub / github.com/testing-library/user-event / getErrorMessage

Function getErrorMessage

src/utils/keyDef/readNextDescriptor.ts:137–150  ·  view source on GitHub ↗
(
  expected: string,
  found: string | undefined,
  text: string,
  context: Context,
)

Source from the content-addressed store, hash-verified

135}
136
137function getErrorMessage(
138 expected: string,
139 found: string | undefined,
140 text: string,
141 context: Context,
142) {
143 return `Expected ${expected} but found "${found ?? ''}" in "${text}"
144 See ${
145 context === 'pointer'
146 ? `https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen`
147 : `https://testing-library.com/docs/user-event/keyboard`
148 }
149 for more information about how userEvent parses your input.`
150}

Callers 2

readTagFunction · 0.85
assertDescriptorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected