MCPcopy
hub / github.com/vitest-dev/vitest / handler

Function handler

packages/vitest/src/node/plugins/optimizer.ts:10–24  ·  view source on GitHub ↗
(viteConfig)

Source from the content-addressed store, hash-verified

8 config: {
9 order: 'post',
10 handler(viteConfig) {
11 const testConfig = viteConfig.test || {}
12
13 const root = resolve(viteConfig.root || process.cwd())
14 const name = viteConfig.test?.name
15 const label = typeof name === 'string' ? name : (name?.label || '')
16
17 viteConfig.cacheDir = VitestCache.resolveCacheDir(
18 resolve(root || process.cwd()),
19 testConfig.cache != null && testConfig.cache !== false
20 ? testConfig.cache.dir
21 : viteConfig.cacheDir,
22 label,
23 )
24 },
25 },
26 }
27}

Callers

nothing calls this directly

Calls 2

resolveCacheDirMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected