test(analysis-view): order the message-cutoff fixture lexicographically (#3018)

boundedViewMessages returns uniqueSorted output, so the 100-message fixture
came back in lexicographic order ("message 59", "message 6", "message 60")
while the assertion compared against generation order. Pad the index to a
fixed width so both orders coincide and the test checks what it means to:
that no count-based cutoff applies below the byte budget.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
morconsultoriadigital-afkandClaude Opus 5 authored and GitHub committed 2026-10-14 05:45:41 +08:00
1 parent 14fef73882
commit 1342eddd03
1 file changed
+1 -1
+1 -1
View File
@@ -957,7 +957,7 @@ it("keeps the complete unique set when it fits the byte budget", () => {
it("does not impose a message-count cutoff below the byte budget", () => {
const messages = Array.from(
{ length: 100 },
(_, index) => `message ${index}`,
(_, index) => `message ${String(index).padStart(2, "0")}`,
);
expect(
boundedViewMessages(messages, `ev_${"a".repeat(64)}`, "limitations"),