CodeVetter · Repo Unpack · Testing signals
pmndrs/valtio
Tests and CI were inspected, not executed; no passing result or measured coverage is asserted. Vitest runs the tests directory in jsdom with React Testing Library and jest-dom support. Inspected suites cover core graph semantics, React rendering, utility behavior, regressions, and selected performance/memory contracts. This bounded inspection does not establish exhaustive coverage, and the root configuration does not directly include website or example application tests.
- Vitest aliases valtio imports to src, uses jsdom, global APIs, tests/setup.ts, and tests as its discovery directory; V8 coverage output is configured, but the inspected CI command is plain test:spec and no coverage threshold appears in this config.
- Vanilla tests specify object validation, proxy-cache identity, wrappers, child replacement, descriptors, shadowing __proto__/constructor properties, snapshot reuse/read-only properties, subscription batching, synchronous notification, and queued-callback cancellation.
- React optimization tests use render spies, act, fireEvent, and fake timers to specify unchanged-leaf suppression, unwrapping snapshots assigned outside render, non-own deletion behavior, and changing accessed-key dependencies.
- SSR tests assert renderToString output for current and nested state; async tests exercise Suspense with promise-backed values but skip those cases when React's use export is unavailable.
- Collection suites specify historical snapshot lookup and mutation rejection; deepProxy cases cover object cycles, aliasing, collection normalization, and descriptors. DevTools tests cover unsubscribe and malformed ACTION payloads, and watch regression tests cover synchronous loops and async context isolation.
- Memory tests use jest-leak-detector on simple/nested/cyclic proxies and unsubscribed state; the performance test samples 5,000 iterations at depths 4–256 and asserts a log-slope below 0.1 for cached snapshots with subscription, without providing results in this inspection.
- Main CI is configured on main pushes and opened/synchronized PRs to install, check formatting/types/lint, run specs, and build; root TypeScript includes src/tests, while root ESLint explicitly ignores examples and website.
- Additional workflows configure CJS/ESM artifact testing in development mode, React 18/19/canary/experimental compatibility, and TypeScript 4.5–5.9 type checks with compatibility patches; the production build-matrix option is commented out.