Vitest · Pipe
test.setupFiles
test.setupFiles points to files that Vitest runs before each test file. Use it for shared setup such as polyfills, global configuration, custom matchers, and hooks.
Last updated
Syntax
test: { setupFiles: string | string[] }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
sequence.setupFilesglobalSetupbeforeEachafterEachTest Run Lifecycle