Skip to content
masterclass Buddy

Vitest · Pipe

test.include

A TestProject is one Vitest project. Its API can find test files, check whether a file is a test, and import modules through Vite.

Last updated

Syntax

project.globTestFiles(filters: string[])
project.matchesTestGlob(moduleId: string, source?: () => string): boolean
project.import<T>(moduleId: string): Promise<T>

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

Subscribe
  • globTestFiles
  • matchesTestGlob
  • import
  • test.include
  • test.exclude
  • test.includeSource
  • test.typecheck.include
  • name

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