# prefer-async-await πŸ“ Prefer async/await over returning a Promise. πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-node-test#preset-configs). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-node-test#preset-configs). Returning a Promise chain from a test callback is harder to read and debug than using `async`/`await`. This rule flags non-async test callbacks that return a `.then()` chain or a variable that was assigned from one. ## Examples ```js import test from 'node:test'; // ❌ test('foo', t => { return fetchData().then(data => { t.assert.strictEqual(data.length, 3); }); }); // βœ… test('foo', async t => { const data = await fetchData(); t.assert.strictEqual(data.length, 3); }); ```