4 ms·
>Steve correctly notes that front-end programming is hard, but leaves out maybe the single most important reason why: It’s super-hard to unit-test prop
by coldtea 9y ago
>Steve correctly notes that front-end programming is hard, but leaves out maybe the single most important reason why: It’s super-hard to unit-test properly
Yeah, no, that's hardly the reason.
Besides, it's wrong. It might be harder to functional or integration test properly, but unit-testing front-end code properly is not an issue.
- discodave 9y ago100% agree on functional/integ/end to end testing being harder for fronentd. On the other hand, nobody seems to unit-test Javascript where I am. Maybe they're just silly, or maybe it's harder, maybe it's just a lack of tooling. As an aside, it is actually more important to unit test lest "safe" languages. E.g. Java ensures you're passing correct types around at compile time. But with JS/Python et al. you need to unit test to check that you're passing, say a String rather than a tomato.
- kybernetikos 9y agoThere are a lot of good unit testing frameworks for javascript. I've worked on teams using them for significant codebases with high unit test coverage for more than 15 years.
- reggieband 9y ago>nobody seems to unit-test Javascript where I am That is an engineering culture thing. I work on a small JS project (node.js server + React FE) that has >95% unit test code coverage. It isn't even difficult to do - it is just not a major part of a lot of front-end teams culture.