Closed
Description
Now that @testing-library/dom
has adopted the query suggestions, and added it to its core, we can use the exported getSuggestedQuery
method to ensure that we are on the same page as the official lib.
// getSuggestedQuery(...)
{
queryName: 'Role',
queryMethod: 'getByRole',
queryArgs: ['button', { name: /submit/i }],
variant: 'get',
toString() // » getByRole('button', { name: /submit/i })
}
For this to work, we need to upgrade @testing-library/dom
to 7.11.0
(or higher), to include the changes from testing-library/dom-testing-library#608