Closed
Description
Describe the feature you'd like:
New waitFor
async utils expects a callback function as first argument. Though if something else is passed there, the error looks like this:
It's difficult to figure out the actual error with that message (it took me few minutes to found this in a project where I was migrating dom-testing-library to the last version!). I'd like to get a better message for this case.
Suggested implementation:
This would be as simple as throw an error at first line of waitFor
implementation if typeof callback !== 'function'
. I'm happy to implement this myself, though I'm not sure which message should I write so I'd like to discuss that here.
Describe alternatives you've considered:
n/a
Teachability, Documentation, Adoption, Migration Strategy:
n/a