@supawatch/target-fast-check
v0.14.2
Published
fast-check arbitraries generated from live Postgres by supawatch, producing rows shaped like real driver output.
Maintainers
Readme
@supawatch/target-fast-check
The fast-check target for
supawatch. Emits one
Arbitrary per table producing rows shaped exactly like driver output:
enum labels real, numerics as decimal strings, bigints as strings, dates as
Date instances, nullable columns via fc.option.
Configure it in supawatch.config.ts (the CLI loads this package by name):
targets: [{ kind: "fast-check" }]npm install --save-dev fast-check # peer dependencyimport fc from "fast-check";
import { tasksArb } from "./src/schemas/fast-check/tasks.mjs";
fc.assert(fc.property(tasksArb, (row) => myLogic(row) !== undefined));The repo's own suite asserts every generated arbitrary satisfies the generated Zod schema for the same table, so the two targets cannot drift apart silently.
MIT.
