Skip to content
masterclass Buddy

Vitest · Function

test.only

test.only runs only the focused test and any other tests also marked with only in the suite. Use it to isolate a test while debugging.

Last updated

Syntax

test.only(name, body?, timeout?)

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

Subscribe
  • test
  • it.only
  • test.skip
  • test.todo
  • allowOnly

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