Skip to content

Commit b09a6a6

Browse files
committed
test(agent-core): assert the full retained replay window in cron tests
1 parent a16d0a2 commit b09a6a6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/agent-core/test/agent/resume.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,9 @@ describe('limitAgentReplayByTurns', () => {
17811781
records.push(replayMessage('assistant', `report ${turn}`));
17821782
}
17831783
const limited = limitAgentReplayByTurns(records, 5);
1784+
expect(limited).toHaveLength(10);
17841785
expect(JSON.stringify(limited)).toContain('cron fire 15');
1786+
expect(JSON.stringify(limited)).toContain('cron fire 19');
17851787
expect(JSON.stringify(limited)).not.toContain('cron fire 14');
17861788
});
17871789

@@ -1792,7 +1794,9 @@ describe('limitAgentReplayByTurns', () => {
17921794
records.push(replayMessage('assistant', `report ${turn}`));
17931795
}
17941796
const limited = limitAgentReplayByTurns(records, 5);
1797+
expect(limited).toHaveLength(10);
17951798
expect(JSON.stringify(limited)).toContain('missed 15');
1799+
expect(JSON.stringify(limited)).toContain('missed 19');
17961800
expect(JSON.stringify(limited)).not.toContain('missed 14');
17971801
});
17981802
});

0 commit comments

Comments
 (0)