Closed
Description
react-testing-library
version:react
version:node
version:npm
(oryarn
) version:
Relevant code or config:
Code is situated here: https://github.com/testing-library/react-testing-library/blob/master/src/act-compat.js#L32
args[0].indexOf(
'Warning: Do not await the result of calling ReactTestUtils.act',
) === 0
This assumes the first arg passed to console.error
is a string; but the type could be different. For example, it can be an object console.error({ error })
Suggested solution:
We could either:
- Stringify the args before calling
indexOf
- Type check the arg first
Metadata
Metadata
Assignees
Labels
No labels