Fix test expectation for fs.readFile call count in agent-service.test.ts

The test "should reuse existing session if already started" expected fs.readFile to be called 1 time, but startConversation calls it 2 times on first call (loadSession + loadMetadata). The second call correctly reuses the in-memory session.

Co-authored-by: GTheMachine <156854865+GTheMachine@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-14 18:57:54 +00:00
parent 7558fed4e4
commit 202494156b

View File

@@ -103,8 +103,9 @@ describe("agent-service.ts", () => {
});
expect(result.success).toBe(true);
// Should only read file once
expect(fs.readFile).toHaveBeenCalledTimes(1);
// First call reads session file and metadata file (2 calls)
// Second call should reuse in-memory session (no additional calls)
expect(fs.readFile).toHaveBeenCalledTimes(2);
});
});