Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 397 Bytes

File metadata and controls

17 lines (11 loc) · 397 Bytes

vitest/prefer-to-have-length

📝 Enforce using toHaveLength().

⚠️ This rule warns in the 🌐 all config.

🔧 This rule is automatically fixable by the --fix CLI option.

// bad
expect(files.length).toStrictEqual(1)

// good
expect(files).toHaveLength(1)