Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: