ava/no-unknown-modifiers

April 6, 2026 Β· View on GitHub

πŸ“ Disallow unknown test modifiers.

❌ This rule is deprecated. Replaced by ava/no-invalid-modifier-chain which covers more cases.

🚫 This rule is disabled in the βœ… recommended config.

πŸ’‘ This rule is manually fixable by editor suggestions.

Translations: FranΓ§ais

Prevent the use of unknown test modifiers.

Examples

import test from 'ava';

test.onlu(t => {}); // ❌
test.only(t => {}); // βœ…

test.seril(t => {});  // ❌
test.serial(t => {}); // βœ…

test.beforeeach(t => {}); // ❌
test.beforeEach(t => {}); // βœ…

test.unknown(t => {}); // ❌

test.always(t => {});       // ❌ `.always` requires `after` or `afterEach`
test.after.always(t => {}); // βœ…

test.before.always(t => {});    // ❌ `.always` requires `after` or `afterEach`
test.afterEach.always(t => {}); // βœ