Skip to content
masterclass Buddy

Vitest · Function

test.skipIf

test.skipIf defines a test that is skipped when a condition is truthy. It is useful for tests that only apply to certain environments.

Last updated

Syntax

test.skipIf(condition)(name, body?, timeout?)
test.skipIf(condition)(name, options, body?)

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

Subscribe
  • test
  • test.skip
  • test.runIf
  • it.skipIf
  • describe.skipIf

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