# vitest/max-expects 📝 Enforce a maximum number of expect per test. ⚠️ This rule _warns_ in the 🌐 `all` config. ### Rule Details Examples of **incorrect** code for this rule with `max: 1`: ```js test('foo', () => { expect(1).toBe(1) expect(2).toBe(2) }) ``` Examples of **correct** code for this rule: ```js test('foo', () => { expect(1).toBe(1) }) ``` ### Options | Name | Description | Type | | :---- | :-------------------------------------------------- | :----- | | `max` | Maximum number of `expect` calls allowed in a test. | Number | > Default: `5` Maximum number of `expect` per test. ```js { max: number } ```