mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
573 B
573 B
title, outline
| title | outline |
|---|---|
| testNamePattern | Config | deep |
testNamePattern
- Type:
string | RegExp - CLI:
-t <pattern>,--testNamePattern=<pattern>,--test-name-pattern=<pattern>
Run tests with full names matching the pattern.
If you add OnlyRunThis to this property, tests not containing the word OnlyRunThis in the test name will be skipped.
import { expect, test } from 'vitest'
// run
test('OnlyRunThis', () => {
expect(true).toBe(true)
})
// skipped
test('doNotRun', () => {
expect(true).toBe(true)
})