# vitest/prefer-to-be 📝 Enforce using toBe(). ⚠️ 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). ### Correct ```ts import { test } from 'vitest' test('foo', () => { expect(1).toBe(1) }) ``` ### Incorrect ```ts import { test } from 'vitest' test('foo', () => { expect(1).toEqual(1) }) ```