Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 425 Bytes

File metadata and controls

29 lines (19 loc) · 425 Bytes

vitest/no-test-return-statement

📝 Disallow return statements in tests.

⚠️ This rule warns in the 🌐 all config.

Rule Details

incorrect code for this rule:

import { test } from 'vitest'

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

correct code for this rule:

import { test } from 'vitest'

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