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)