MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / makeProject

Function makeProject

packages/lint/src/project.test.ts:22–34  ·  view source on GitHub ↗
(indexHtml: string, subComps?: Record<string, string>)

Source from the content-addressed store, hash-verified

20let dirs: string[] = [];
21
22function makeProject(indexHtml: string, subComps?: Record<string, string>): string {
23 const dir = tmpProject("lint");
24 dirs.push(dir);
25 writeFileSync(join(dir, "index.html"), indexHtml);
26 if (subComps) {
27 const compsDir = join(dir, "compositions");
28 mkdirSync(compsDir, { recursive: true });
29 for (const [name, html] of Object.entries(subComps)) {
30 writeFileSync(join(compsDir, name), html);
31 }
32 }
33 return dir;
34}
35
36afterEach(() => {
37 for (const d of dirs) {

Callers 2

lintSubCompFunction · 0.70
project.test.tsFile · 0.70

Calls 2

entriesMethod · 0.80
tmpProjectFunction · 0.70

Tested by

no test coverage detected