Currently when you run a test with a non-awaited t.throwsAsync the only error shown is Error: Test finished, but an assertion is still pending. I'd love to see something similar to the TypeError thrown for todo tests that have an implementation.
t.throwsAsync(async () => {
await parseDomain();
}, 'Type must be one of [id,uuid,name], undefined given.');
1 test failed [13:01:49]
1 previous failure in test files that were not rerun
parse-domain › allows lookup via name, id and uuid
Error: Test finished, but an assertion is still pending
Type `r` and press enter to rerun tests
Type `u` and press enter to update snapshots
Could you elaborate on what message you'd like to see? Ironically t.throwsAsync and it's t.notThrowsAsync() counterpart are our only assertions that can even be pending, so it should be straight-forward to change the messaging here.
Or, going further, we should have the stack traces of where those assertions were started, so we could list which assertions may not have been awaited properly.
The second one sounds good.
Maybe also add a linting rule similar to the todo one?
OK so to summarize:
t.throwsAsync and t.notThrowsAsync assertions need to be awaited onI'll also open an issue on our ESLint plugin.
Most helpful comment
OK so to summarize:
t.throwsAsyncandt.notThrowsAsyncassertions need to be awaited onI'll also open an issue on our ESLint plugin.