5 ms·
This reminds me of expect tests in OCaml[0]. You create a test function that prints some state and the test framework automatically handles diffing and injectin
by sweetsocks21 2y ago
This reminds me of expect tests in OCaml[0]. You create a test function that prints some state and the test framework automatically handles diffing and injecting the snapshot back into the test location. It helps keep your code modular because you need to create some visual representation of it. And it's usually obvious that's wrong through the diff.
[0] https://github.com/janestreet/ppx_expect https://github.com/janestreet/ppx_expect