Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 727 Bytes

no-alias-methods.md

File metadata and controls

37 lines (22 loc) · 727 Bytes

Disallow alias methods (vitest/no-alias-methods)

⚠️ This rule warns in the 🌐 all config.

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

Rule Details

This rule disallows alias methods and forces the use of the original method.

Examples of incorrect code for this rule:

expect(a).toBeCalled()
expect(a).toBeCalledTimes(1)

Examples of correct code for this rule:

expect(a).toHaveBeenCalled()
expect(a).toHaveBeenCalledTimes(1)

When Not To Use It

If you don't care about alias methods, you can disable this rule.