repeat-test
This is a property-testing library for TypeScript that lets developers define new Arbitraries by writing code that randomly generates one value at a time, in addition to combinators like .map(), .chain(), and .oneOf(). It uses a shrinking approach inspired by Hypothesis and includes a Domain subclass that performs validation similar to Zod and is useful for generating unique keys. It is Deno-only.
What it addresses
Working with combinators like .map(), .chain(), and .oneOf() to define new Arbitraries requires thinking in terms of sets; the library offers an easier way to define them.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
repeat-test
This is a property-testing library for TypeScript that lets developers define new Arbitraries by writing code that randomly generates one value at a time, in addition to combinators like .map(), .chain(), and .oneOf(). It uses a shrinking approach inspired by Hypothesis and includes a Domain subclass that performs validation similar to Zod and is useful for generating unique keys. It is Deno-only.
Problem: Working with combinators like .map(), .chain(), and .oneOf() to define new Arbitraries requires thinking in terms of sets; the library offers an easier way to define them.
Audience: TypeScript/Deno developers writing property-based tests
Posted by @skybrian · Original source ↗
Source text · @skybrian · · Source ↗
I'm writing a new property-testing library for TypeScript. [1] I wanted a way to define new Arbitraries that's easier than working with .map(), .chain(), .oneOf(), and other combinators that require you to think in terms of sets. It has those combinators, but you can also write code to randomly generate one value at a time. It uses an approach to shrinking that's inspired by Hypothesis.