Hacker News new | past | comments | ask | show | jobs | submit login

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.

Along the way, I ended up adding a Domain subclass, which also does validation like Zod. Not sure where I'm going with that, but it's also useful for generating unique keys.

(The documentation isn't done and doesn't explain what's interesting about it. Caveat: it's Deno-only, and will probably stay that way unless someone wants to help.)

[1] https://jsr.io/@skybrian/repeat-test




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: