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

Function init

packages/vitest/src/node/cli/cac.ts:328–336  ·  view source on GitHub ↗
(project: string)

Source from the content-addressed store, hash-verified

326}
327
328async function init(project: string) {
329 if (project !== 'browser') {
330 console.error(new Error('Only the "browser" project is supported. Use "vitest init browser" to create a new project.'))
331 process.exit(1)
332 }
333
334 const { create } = await import('../../create/browser/creator')
335 await create()
336}
337
338async function collect(mode: VitestRunMode, cliFilters: string[], options: CliOptions): Promise<void> {
339 try {

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
exitMethod · 0.80
createFunction · 0.50

Tested by

no test coverage detected