MCPcopy Index your code
hub / github.com/EvolvingPrograms/turing / writeTestFile

Function writeTestFile

src/utils.ts:6–19  ·  view source on GitHub ↗
(
  id: string,
  path: string,
  contents: string
)

Source from the content-addressed store, hash-verified

4import { tokens, AH, HA, BH, HB, Value, Instance } from "./tokens";
5
6export const writeTestFile = async (
7 id: string,
8 path: string,
9 contents: string
10) => {
11 const fullPath = resolve("logs", id, path);
12 const logDir = resolve("logs", id);
13
14 if (existsSync(logDir) === false) {
15 mkdirSync(logDir, { recursive: true });
16 }
17
18 return await writeFile(fullPath, contents);
19}
20
21export const loadTestFile = async (id: string, file: string): Promise<any> => {
22 const path = resolve("programs", id, file);

Callers 1

runChallengeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected