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

Method getProjectByName

packages/vitest/src/node/core.ts:513–521  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

511 }
512
513 public getProjectByName(name: string): TestProject {
514 const project = this.projects.find(p => p.name === name)
515 || this.coreWorkspaceProject
516 || this.projects[0]
517 if (!project) {
518 throw new Error(`Project "${name}" was not found.`)
519 }
520 return project
521 }
522
523 /**
524 * Import a file using Vite module runner. The file will be transformed by Vite and executed in a separate context.

Callers 15

mergeReportsMethod · 0.95
_reportFileTaskMethod · 0.95
resolveTesterFunction · 0.80
setupBrowserRpcFunction · 0.80
onTestRunEndMethod · 0.80
getModuleGraphFunction · 0.80
getTransformResultFunction · 0.80
readCoverageFilesMethod · 0.80
syncUpdateStacksMethod · 0.80
onUserConsoleLogFunction · 0.80
printLeaksSummaryFunction · 0.80
printTaskErrorsFunction · 0.80

Calls

no outgoing calls

Tested by 1

getSerializedModuleGraphFunction · 0.64