Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 486 Bytes

File metadata and controls

29 lines (19 loc) · 486 Bytes

vitest/prefer-to-be

📝 Enforce using toBe().

⚠️ This rule warns in the 🌐 all config.

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

Correct

import { test } from 'vitest'

test('foo', () => {
  expect(1).toBe(1)
})

Incorrect

import { test } from 'vitest'

test('foo', () => {
  expect(1).toEqual(1)
})