▲ | integralid 6 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
> So if your code is ascertained to work at the high level, you also know that it must be working at the lower level too In the ideal world maybe. But It's very hard to test edge cases of a sorting algorithm with integration test. In general my experience is that algorithms and some complex but pure functions are worth writing unit tests for. CRUD app boilerplate is not. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | MoreQARespect 6 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Ive never in my life written a test for a sorting algorithm nor, im sure, will i ever need to. The bias most developers have towards integration tests reflects the fact that even though we're often interviewed on it, it's quite rare that most developers actually have to write complex algorithms. It's one of the ironies of the profession. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|