veza/apps/web/src/schemas
senke 27b57db3ea
Some checks failed
Veza CI / Rust (Stream Server) (push) Successful in 3m31s
Security Scan / Secret Scanning (gitleaks) (push) Successful in 1m8s
Veza CI / Backend (Go) (push) Successful in 5m14s
Veza CI / Frontend (Web) (push) Successful in 23m16s
Veza CI / Notify on failure (push) Has been skipped
E2E Playwright / e2e (full) (push) Has been cancelled
fix(test): exclude Invalid Date from fc.date arbitrary in validation property test
CI run 461 (frontend ci.yml) hit a true property-test flake:

  FAIL src/schemas/__tests__/validation.property.test.ts > property:
    isoDateSchema > accepts valid ISO 8601 datetime strings
  RangeError: Invalid time value
    at MapArbitrary.mapper validation.property.test.ts:73:12
        (d) => d.toISOString()

`fc.date({ min, max })` from fast-check can occasionally generate the
`new Date(NaN)` sentinel ("Invalid Date") even with min/max bounds. The
.map((d) => d.toISOString()) step then throws RangeError, failing the
property and the whole vitest run.

Fast-check 3.13+ exposes `noInvalidDate: true` as a generator option
that skips the NaN-Date sentinel; we're on 4.7, so the option is
available. Adding it makes the arbitrary deterministic-ish and
removes the flake.

Verified locally — 39/39 property tests pass repeatedly.

SKIP_TESTS=1 — single-file test fix already verified by hand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 14:24:42 +02:00
..
__tests__ fix(test): exclude Invalid Date from fc.date arbitrary in validation property test 2026-04-27 14:24:42 +02:00
apiRequestSchemas.test.ts fix(a11y): fix heading hierarchy h1→h3 gaps on 8 pages 2026-03-25 10:14:18 +01:00
apiRequestSchemas.ts fix(v0.12.6.1): remediate remaining 15 MEDIUM + LOW pentest findings 2026-03-12 06:13:38 +01:00
apiSchemas.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
apiSchemas.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
validation.ts fix(MVP-015): Standardize remember_me field name to snake_case 2025-12-22 23:27:51 +01:00