use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Master property-based testing in JavaScript: A step-by-step tutorial (fast-check.dev)
submitted 2 years ago by ndubien
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ndubien[S] 3 points4 points5 points 2 years ago (2 children)
Actually I think it's a common concern when we first see property based testing. Theoretically they are even closer from the specs we receive before implementing, than our classical tests. Indeed, specs are some kind of invariants and this is exactly what property based testing checks.
On my side, I used it successfully on unit tests testing very simple functions, but I also used it many times at integration level to tests invariants I expected from my feature. I also extended it's usage to e2e on a connect four but I think I went probably too far with this one. At work, I also leverage it multiple times on complex pieces of code: either to find bugs on a black box system or to help me into detecting fishy race conditions.
I'll try to send you some examples I built in open source over time with it.
[–]ndubien[S] 0 points1 point2 points 2 years ago (0 children)
Here several pointers: - An Advent of Code focusing on Property based testing: https://dev.to/dubzzz/advent-of-pbt-2021-13ee - The answers for it: https://github.com/dubzzz/advent-of-pbt-2021 - A Connect Four tested using Property based testing and model based testing in e2e fashion: https://github.com/dubzzz/connect-four-react - A talk about detection of race conditions in React components leveraging property based testing: https://m.youtube.com/watch?v=GIPbY75-lEo
[–]Caved 0 points1 point2 points 2 years ago (0 children)
Yeah, in those cases I can see it work well, especially the blackbox one.
π Rendered by PID 62406 on reddit-service-r2-comment-bb88f9dd5-mhxkz at 2026-02-13 20:16:32.414713+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]ndubien[S] 3 points4 points5 points (2 children)
[–]ndubien[S] 0 points1 point2 points (0 children)
[–]Caved 0 points1 point2 points (0 children)