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 => {}); // β