Latest Results
test: add integration suite covering cross-module compositions
Populate packages/plainfp/src/__tests__/ with cross-module integration
tests. Unit + property tests cover the primitives; these tests verify
that realistic user-facing compositions actually work end to end.
Six scenarios, each in its own *.int.test.ts file:
- parse-validate-transform — the canonical fromZod → Result.flatMap →
Result.map → match pipeline, with parse, business, and domain errors
short-circuiting at the right layer.
- batch-fetch — Arrays.map over ids into ResultAsync.fromPromise calls,
collected by ResultAsync.all; plus allWithConcurrency with realistic
staggered latencies to verify the concurrency cap holds.
- retry-timeout-fetch — a realistic fetch client composed from
fromPromise + retry + timeout + map + mapError. Covers recovery from
transient failures, giving up after N attempts, and timeout races.
- option-result-interop — the lookup → toResult → validate → getOr flow
that lets Option and Result coexist cleanly. Round-trip semantics
(toOption ∘ toResult preserves some values, discards errors on none)
are locked in.
- data-pipeline — the README's headline Arrays.groupBy → Records.mapValues
→ Arrays.sumBy example, plus countBy-by-status, uniqueBy dedup, and
empty-input robustness.
- tagged-errors — Tagged.tag + hasTag composed with Result + mapError +
match for exhaustive discriminated error handling.
27 new test cases, 276 total passing. No runtime code touched.
These files live under src/__tests__/ as originally planned in the project
scope; individual unit tests continue to be colocated beside the module
they test. Latest Branches
0%
0%
0%
© 2026 CodSpeed Technology