You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: property-based testing foundation (fast-check) over parsing/geometry kernels #1413
No property-based tests exist. The highest-value targets are pure parse/print and geometry kernels that agents touch constantly and that currently rely on hand-picked examples.
Deliverables
Add fast-check as a dev dependency; add input generators (selectors, refs, rects, .ad lines) to src/__tests__/test-utils/ behind the existing barrel.
First properties, each in the owning module's test file:
Selector grammar: parse→serialize→parse idempotence, including quote/apostrophe hazards (src/selectors/parse.ts).
buildGesturePlan: for any supported gesture and any viewport, every synthesized point stays in bounds (replaces the two hand-pinned compact viewports in test/integration/smoke-ios-simulator-coverage.test.ts as the general guarantee; keep those as examples).
.ad script parser: parse→serialize→parse stability for generated valid scripts (src/replay/script.ts).
Snapshot diff: diff(a,a) is empty; summary counts always equal rendered line counts (src/snapshot/snapshot-diff.ts).
One short section in docs/agents/testing.md: "pure parser or geometry change → extend a property, not another example."
Acceptance
Properties run in unit-core within the slow-test budget (bound numRuns).
Failure output includes the shrunk counterexample.
Activity
test: property-based testing foundation over parse/print and geometry…
test: property-based testing foundation (fast-check) over parse/print…