Recommended Unit Testing & Property Testing

I come from Mocha and a bit of Chai, with JSVerify for property testing. I want to convert my tests to ReScript and found this one: https://github.com/bloodyowl/rescript-test for unit and this for property https://github.com/TheSpyder/rescript-fast-check

Are there recommended ones or are these ok?

2 Likes

Screen Shot 2021-02-28 at 10.33.19 AM

:smile:Progress!

2 Likes

@chenglou mentioned that there is a new testing utility coming out from the ReScript team.

I hope this will be a replacement for my current setup of Jest + @glennsl/bs-jest since I’ve been struggling with esmodules on tests.

1 Like

I’m using my fast-check library with bs-mocha in production. I am planning to investigate zora soon, but it would take a lot to convert our existing tests :man_shrugging:

1 Like

Any update on this? What are most people using for property-based testing?

My favorite testing library is hedgehog, so anything close to that would be great.

3 Likes

did you find anything?

I didn’t spend any more time looking, but I would shop amongst the javascript property testing options and create bindings for the one that you like.

How is that nobody recommended Rescript test?

1 Like

It’s missing two important features for me:

  1. Coverage reports
  2. Wallaby support

So instead of reinventing a test fremework, I prefer using bindings for existing ones.

2 Likes

Interesting, none of those are important for me, but this is the kind of response that I was looking for. Do you get wallaby annotations on you res files?

Nope, but it’s still brings enough value to continue using it.

wow this looks like what I need. no JS dependencies. simple and quick

1 Like

That is how I feel about it too