Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 486 Bytes

prefer-to-be.md

File metadata and controls

28 lines (18 loc) · 486 Bytes

Enforce using toBe() (vitest/prefer-to-be)

⚠️ 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)
})