One of the nicest new things I learnt since starting my #OCaml journey are "expect tests". These are code tests where you don't have to define the expected result beforehand – the test runner figures it out for you!
It's a really nice replacement for that early tinkering with a bit of functionality where you just want to "print it out and see whether it looks right", especially where the output could be a fairly complex data type. OCaml's expect tests make it possible to capture the actual output, and adapt the test's "expectation" accordingly.
Everything uses the output's string representation, so you end up with regression tests that also document your functions' typical output representation very nicely.
To be clear, they're not a replacement for regular unit tests, but they're really useful for figuring out pieces of code where a bit of trial-and-error testing is needed.
Here's an excellent writeup of how they work and why they rock: https://blog.janestreet.com/the-joy-of-expect-tests/