4 ms·
[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
by 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.