Skip to content
masterclass Buddy

Vitest · Function

test.each

test.each runs the same test once for every data row. It is useful for checking many inputs without copying the test body.

Last updated

Syntax

test.each(cases)(name, body)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • test
  • it.each
  • test.for
  • TestContext
  • test.concurrent

Source: Test | Vitest. Checked 2026-11-03.