From 020c57d6cb4525742e2dadbeeae8a9bd84bc1c28 Mon Sep 17 00:00:00 2001 From: Dery Ferdika <114888155+DeryFerd@users.noreply.github.com> Date: Sun, 15 Nov 2026 00:22:05 +0700 Subject: [PATCH] test(explore): pin the finding fields the schema test left unbounded (#1792) --- packages/e2e/tests/unit/explore-state.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/e2e/tests/unit/explore-state.test.ts b/packages/e2e/tests/unit/explore-state.test.ts index 4060e65b6..087f47bac 100644 --- a/packages/e2e/tests/unit/explore-state.test.ts +++ b/packages/e2e/tests/unit/explore-state.test.ts @@ -103,13 +103,23 @@ describe('ExploreState', () => { const state = new ExploreState('goal', { maxSteps: 2, timeoutMs: 300_000 }); state.beginStep('x'.repeat(400), 'y'.repeat(5_000)); state.endStep('passed', 'z'.repeat(9_000)); - finding(state, { title: 't'.repeat(300), reproduction: Array.from({ length: 30 }, () => 'r'.repeat(900)) }); + finding(state, { + title: 't'.repeat(300), + expected: 'e'.repeat(2_500), + actual: 'a'.repeat(2_500), + path: 'p'.repeat(2_500), + reproduction: Array.from({ length: 30 }, () => 'r'.repeat(900)), + }); state.end('finished', 's'.repeat(9_000)); const snapshot = state.snapshot(); assertValidExplore(snapshot); expect(snapshot.steps[0]!.title).toHaveLength(200); expect(snapshot.steps[0]!.instruction).toHaveLength(2_000); + expect(snapshot.findings[0]!.expected).toHaveLength(2_000); + expect(snapshot.findings[0]!.actual).toHaveLength(2_000); + expect(snapshot.findings[0]!.path).toHaveLength(2_048); expect(snapshot.findings[0]!.reproduction).toHaveLength(20); + expect(snapshot.findings[0]!.reproduction.every((entry) => entry.length === 500)).toBe(true); expect(snapshot.summary).toHaveLength(4_000); });