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

Function tryResolve

packages/browser/src/node/plugin.ts:597–605  ·  view source on GitHub ↗
(path: string, paths: string[])

Source from the content-addressed store, hash-verified

595}
596
597function tryResolve(path: string, paths: string[]) {
598 try {
599 const _require = getRequire()
600 return _require.resolve(path, { paths })
601 }
602 catch {
603 return undefined
604 }
605}
606
607let _require: NodeRequire
608function getRequire() {

Callers 1

configFunction · 0.85

Calls 2

getRequireFunction · 0.85
resolveMethod · 0.45

Tested by

no test coverage detected