Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 422 Bytes

no-test-return-statement.md

File metadata and controls

27 lines (18 loc) · 422 Bytes

Disallow return statements in tests (vitest/no-test-return-statement)

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