react-testing-library version: react version:node version:npm (or yarn) version: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 })
We could either:
indexOfType check the arg first
This seems fine, since the condition is always false (never matches) when the input is not a string
Agreed. Would you like to make a pull request for this @SBoudrias?
@kentcdodds I can go ahead and add some type checking to the args for this.
@ely-alamillo you still taking this? I can also do this one?
@rvdkooy yes, there was a blocking issue but it's now resolved so i'm still working on this.
If I don't get anything in by the eow you can take it.
Why does this case exist if it's not doing anything ? https://github.com/testing-library/react-testing-library/blob/master/src/act-compat.js#L38
@kentcdodds
Because otherwise this would run:
Most helpful comment
@kentcdodds I can go ahead and add some type checking to the args for this.