mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-17 15:50:45 +00:00
test: tighten control ui buffer assertions
This commit is contained in:
@@ -70,8 +70,13 @@ describe("recordControlUiPerformanceEvent", () => {
|
||||
}
|
||||
|
||||
expect(host.eventLogBuffer).toHaveLength(250);
|
||||
expect(host.eventLogBuffer[0]?.payload).toEqual({ i: 259 });
|
||||
expect(host.eventLogBuffer.at(-1)?.payload).toEqual({ i: 10 });
|
||||
const [newestEvent] = host.eventLogBuffer;
|
||||
const oldestEvent = host.eventLogBuffer.at(-1);
|
||||
if (!newestEvent || !oldestEvent) {
|
||||
throw new Error("Expected bounded performance event buffer entries");
|
||||
}
|
||||
expect(newestEvent.payload).toEqual({ i: 259 });
|
||||
expect(oldestEvent.payload).toEqual({ i: 10 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user