MCPcopy Create free account
hub / github.com/anus-dev/ANUS / readLogFile

Function readLogFile

packages/core/src/core/logger.test.ts:59–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57}
58
59async function readLogFile(): Promise<LogEntry[]> {
60 try {
61 const content = await fs.readFile(TEST_LOG_FILE_PATH, 'utf-8');
62 return JSON.parse(content) as LogEntry[];
63 } catch (error) {
64 if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
65 return [];
66 }
67 throw error;
68 }
69}
70
71vi.mock('../utils/session.js', () => ({
72 sessionId: 'test-session-id',

Callers 1

logger.test.tsFile · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected