feat(cli): convert e2e-check scenarios to snapshot fixture tests #68
Reference in New Issue
Block a user
Delete Branch "fix/66-e2e-snapshot-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Converts all 45 e2e-check.yaml workflow scenarios (plus one derived test) into 46 fast, deterministic
bun testsnapshot fixture tests inpackages/cli-json-cas/src/e2e.test.ts.Why
Replaces the slow workflow-driven e2e checks with a proper test suite that runs in CI via
bun test, giving faster feedback and a repeatable test contract.Changes
packages/cli-json-cas/src/e2e.test.ts— new file with 46 tests across 7describeblocks (CAS Core, Schema Validation, Variable System, Template System, Render, GC, Edge Cases)packages/cli-json-cas/src/__snapshots__/e2e.test.ts.snap— auto-generated deterministic snapshots (33 entries)Key design decisions:
beforeAlltemp store so hashes computed in Phase 1 are reusable in later phasesstripVolatile()helper removestimestamp/created/updatedfields before snapshottingtoContain("Validation failed")instead of snapshotting the machine-specific tmp pathtotal >= reachable, all numbers) rather than exact countsRef
Fixes #66