Getting console error: Expected key descriptor but found "" in "" #1183
Unanswered
ankitsingh2013
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My config is:
{
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^14.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
},
Test Case -
`test("Submitting the form the Todo text should show on the Todos list", async () => {
const user = userEvent.setup();
render()
const titleInput = await screen.findByLabelText(/title/i);
const descriptionInput = await screen.findByLabelText(/Description/i)
const submitButton = await screen.findByRole("button", {
name: "Submit"
})
await user.clear(titleInput)
await user.type(titleInput, "React Query tetet")
await user.clear(descriptionInput)
await user.type(descriptionInput,"A React Query is very good course")
await user.tab()
logRoles(submitButton)
expect(submitButton).toHaveFocus()
user.click(submitButton)
const loaderButton = await screen.findByRole("button", {
name: "loadingbutton"
})
expect(loaderButton).toBeInTheDocument()
})`
Console Error
Expected key descriptor but found "" in ""
See https://testing-library.com/docs/user-event/keyboard
for more information about how userEvent parses your input.
Beta Was this translation helpful? Give feedback.
All reactions