3 ms·
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 d
by pseudoramble 6y ago
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.
- Untit1ed 6y agoLooks like it's able to automatically figure out the reversal when you map an arbitrary to an arbitrary rather than having to specifically define it like in jsverify, which is nice.
- dubzzz 6y ago[I'm the author of fast-check] Here are some of the benefits that you won't have in jsverify and that pushed me to create fast-check: - oneof can shrink - map does not need unmap to be passed to be able to shrink - can find bug (see bias in the doc) - in this example jsverify will not find any bugs: jsc.assert(jsc.forall(jsc.integer(),n => Math.abs(n) <= 50))* - replay of previous runs based on seed + path - race conditions detection - model based testing *The reason why it does not find the bug is that by default it will always generate small values. If you ask for jsc.integer(0, 1000000) then the test jsc.assert(jsc.forall(jsc.integer(0, 1000000),n => Math.abs(n) > 50)) will always be green too. Not with fast-check, it will find the issue for both cases.