# no-expect-failure-without-reason πŸ“ Require a reason when marking a test or suite as expected to fail. πŸ’ΌπŸš« 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). An expected-failure test passes only when it fails. Without an explanation, readers cannot tell which known problem it tracks or when it should be re-enabled. `node:test` accepts a reason string for `expectFailure`. This rule reports `{expectFailure: true}` options on tests and suites. It is enabled in the `recommended` config. Chained modifiers (`test.expectFailure(…)`) have no way to attach a reason, so they are not reported; use the options form with a reason instead. Matcher values, including `RegExp` and `{label, match}` objects, are also not reported. ## Examples ```js import test from 'node:test'; // ❌ test('new behavior', {expectFailure: true}, () => { // … }); // βœ… test('new behavior', {expectFailure: 'blocked on #123'}, () => { // … }); ```