MCPcopy
hub / github.com/angular/angular / makeTempDir

Function makeTempDir

packages/compiler-cli/test/test_support.ts:20–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18const tmpdir = process.env['TEST_TMPDIR']!;
19
20export function makeTempDir(): string {
21 let dir: string;
22 while (true) {
23 const id = (Math.random() * 1000000).toFixed(0);
24 dir = path.posix.join(tmpdir, `tmp.${id}`);
25 if (!fs.existsSync(dir)) break;
26 }
27 fs.mkdirSync(dir);
28 return dir;
29}
30
31export interface TestSupport {
32 basePath: string;

Callers 1

setupFunction · 0.70

Calls 1

joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…