| ▲ | Storment33 3 hours ago | |
It is called snapshot testing, very valid technique. Maybe not best suited to a mathematical function like they have here, but I have found it useful for stuff like compilers asserting on the AST, where it would be a pain to write out and assert on the output and may also change shape. | ||
| ▲ | xenophonf an hour ago | parent [-] | |
TIL. That looks like a nice way to add tests to legacy code without having to re-create what TDD would have had the developers started that way. | ||