I got into property-based testing when doing a lot of Scala, and I'm a big fan. Beyond trivial tests, it begins to require a whole different bag of techniques to write good tests. But I think it's worth the investment. The key benefit, IMO, is that it helps remove "happy path bias", in which I, as the author, have a hard time getting out of my assumptions about inputs.
For those looking for property based testing for Python: <a href="https://hypothesis.works" rel="nofollow">https://hypothesis.works</a>
The clojure/clojurescript tooling for QuickCheck is quite powerful - as it has a wide range of generators which are able to generate smarter / more specific data than simply matching on types.<p>And since clojurescript can be compiled and exported to JavaScript, this makes it available to JavaScript projects. A few years ago I packaged this up as <a href="https://github.com/glenjamin/checkers" rel="nofollow">https://github.com/glenjamin/checkers</a>. I expect there are newer versions of the underlying library available now, but as I haven't been working in this ecosystem for a while, I haven't kept the package up to date.
This seems similar in concept to Haskell’s QuickCheck[1]. Both generate tests based on an invariant/“property” of the output and can narrow down to the simplest failing test case.<p>[1]: <a href="https://hackage.haskell.org/package/QuickCheck" rel="nofollow">https://hackage.haskell.org/package/QuickCheck</a>
Looks pretty nice. I only have a little exposure to jsverify. How does fastcheck compare to that? On the surface it looks a bit more modern using TS, but that doesn’t tell one much.