fix: split agent runner test quality hotspot (#225)

This commit is contained in:
Eyejoker
2026-06-07 23:01:23 +09:00
committed by GitHub
parent 29ca23a558
commit 337d46461c

View File

@@ -337,6 +337,18 @@ describe('agent-runner timeout behavior', () => {
}), }),
); );
}); });
});
describe('agent-runner environment wiring', () => {
beforeEach(() => {
vi.useFakeTimers();
vi.clearAllMocks();
fakeProc = createFakeProcess();
});
afterEach(() => {
vi.useRealTimers();
});
it('passes the actual chat JID into codex runner MCP env', async () => { it('passes the actual chat JID into codex runner MCP env', async () => {
vi.useRealTimers(); vi.useRealTimers();
@@ -744,6 +756,18 @@ OUROBOROS_LLM_BACKEND = "codex"
expect(toml).toContain('OUROBOROS_AGENT_RUNTIME = "codex"'); expect(toml).toContain('OUROBOROS_AGENT_RUNTIME = "codex"');
expect(toml).toContain('[mcp_servers.ejclaw]'); expect(toml).toContain('[mcp_servers.ejclaw]');
}); });
});
describe('agent-runner output flushing', () => {
beforeEach(() => {
vi.useFakeTimers();
vi.clearAllMocks();
fakeProc = createFakeProcess();
});
afterEach(() => {
vi.useRealTimers();
});
it('waits for queued streamed output before resolving an error exit', async () => { it('waits for queued streamed output before resolving an error exit', async () => {
let releaseOutputs: (() => void) | undefined; let releaseOutputs: (() => void) | undefined;