MCPcopy Create free account
hub / github.com/angular/angular / getFilePath

Function getFilePath

modules/playground/e2e_test/sourcemap/sourcemap_spec.ts:61–73  ·  view source on GitHub ↗
(relPath: string)

Source from the content-addressed store, hash-verified

59});
60
61function getFilePath(relPath: string): string {
62 const candidates = [
63 resolve(relPath),
64 resolve(process.cwd(), relPath),
65 process.env['TEST_SRCDIR'] ? resolve(process.env['TEST_SRCDIR'], '_main', relPath) : null,
66 process.env['TEST_SRCDIR'] ? resolve(process.env['TEST_SRCDIR'], relPath) : null,
67 ].filter((p): p is string => Boolean(p));
68
69 for (const c of candidates) {
70 if (existsSync(c)) return c;
71 }
72 return resolve(relPath);
73}

Callers 1

sourcemap_spec.tsFile · 0.85

Calls 2

resolveFunction · 0.50
filterMethod · 0.45

Tested by

no test coverage detected