# ava/use-t-throws-async-well 📝 Require `t.throwsAsync()` and `t.notThrowsAsync()` to be awaited. 💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config). 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). When you use the `t.throwsAsync()` and `t.notThrowsAsync()` assertions, you must await the promise they return. If the test function completes before the assertions do, the test will fail. This rule is fixable inside `async` functions. It will insert `await` before `t.throwsAsync()` and `t.notThrowsAsync()`. ## Examples ```js import test from 'ava'; // ❌ test('main', t => { t.throwsAsync(somePromise); t.notThrowsAsync(somePromise); }); // ✅ test('main', async t => { await t.throwsAsync(somePromise); await t.notThrowsAsync(somePromise); const p = t.throwsAsync(somePromise); t.throwsAsync(somePromise).then(…); }); ```