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

Function handler

packages/vitest/src/node/plugins/index.ts:263–279  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

261 },
262 configureServer: {
263 async handler(server) {
264 if (options.watch && process.env.VITE_TEST_WATCHER_DEBUG) {
265 server.watcher.on('ready', () => {
266 // eslint-disable-next-line no-console
267 console.log('[debug] watcher is ready')
268 })
269 }
270 await vitest._setServer(options, server)
271 if (options.api && options.watch) {
272 (await import('../../api/setup')).setup(vitest)
273 }
274
275 // #415, in run mode we don't need the watcher, close it would improve the performance
276 if (!options.watch) {
277 await server.watcher.close()
278 }
279 },
280 },
281 },
282 MetaEnvReplacerPlugin(),

Callers

nothing calls this directly

Calls 5

_setServerMethod · 0.80
setupMethod · 0.80
onMethod · 0.45
logMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected