avajs/eslint-plugin-ava

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`t.throwsAsync()` and `t.notThrowsAsync()` should be awaited on #274

novemberborn posted onGitHub

When you use the t.throwsAsync() and t.notThrowsAsync() assertion, you must await the promise they return. If the test function completes before the assertions do the test will fail.

We should add a rule to ensure users invoke these assertions with the await keyword. I'm not sure whether it should be recommended — you could assign the promise to a variable and await it later, but I don't think that's typical when you write tests.

See also the discussion in https://github.com/avajs/ava/issues/2245.

@sindresorhus?


Note: This issue has a bounty, so it's expected that you are an experienced programmer and that you give it your best effort if you intend to tackle this. Don't forget, if applicable, to add tests, docs (double-check for typos). And don't be sloppy. Review your own diff multiple times and try to find ways to improve and simplify your code. Instead of asking too many questions, present solutions. The point of an issue bounty is to reduce my workload, not give me more. Include a 🦄 in your PR description to indicate that you've read this. Thanks for helping out 🙌 - @sindresorhus


I think it should be recommended.

posted by sindresorhus over 5 years ago

@issuehunt has funded $60.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

Fund this Issue

$60.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

stroncium submitted an output to  avajs/ eslint-plugin-ava# 274
over 5 years ago
issuehunt funded 60.00 for avajs/eslint-plugin-ava# 274
over 5 years ago