Skip to content
masterclass Buddy

Vitest · Type Alias

TestContext

TestContext is the object Vitest passes to each test callback. It gives the test metadata and an expect function bound to that test.

Last updated

Syntax

(context: TestContext) => unknown

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

Subscribe
  • test
  • it
  • test.concurrent
  • expect
  • task

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