| 4 | import { tokens, AH, HA, BH, HB, Value, Instance } from "./tokens"; |
| 5 | |
| 6 | export 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 | |
| 21 | export const loadTestFile = async (id: string, file: string): Promise<any> => { |
| 22 | const path = resolve("programs", id, file); |