# require-assertion πŸ“ Require that each test contains at least one assertion. πŸ’ΌπŸš« 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). A test without any assertions will always pass, even if the code under test is broken. This rule requires each `test`/`it` call to contain at least one assertion from `node:assert`, the test context's `assert` property, or the `assert` property directly destructured from the test callback parameter. Note: Tests that reference an external implementation (without an inline function body) are not flagged, since the implementation may contain assertions. ## Examples ```js import test from 'node:test'; import assert from 'node:assert'; // ❌ test('foo', () => { doSomething(); }); // ❌ test('foo', () => {}); // βœ… test('foo', () => { assert.strictEqual(result, expected); }); // βœ… test('foo', t => { t.assert.ok(value); }); // βœ… test('foo', ({assert}) => { assert.ok(value); }); // βœ… β€” external implementation, may contain assertions test('foo', implementation); ```