# vitest/prefer-mock-promise-shorthand 📝 Enforce mock resolved/rejected shorthands for promises. ⚠️ This rule _warns_ in the 🌐 `all` config. 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). ```ts // bad vi.fn().mockReturnValue(Promise.reject(42)) vi.fn().mockImplementation(() => Promise.resolve(42)) // good vi.fn().mockRejectedValue(42) vi.fn().mockResolvedValue(42) ```