4 ms·
Am I the only one making AngularJS apps without writing a single test? The examples given are usually "test that this custom math function is doing what it shou
by Kiro 13y ago
Am I the only one making AngularJS apps without writing a single test? The examples given are usually "test that this custom math function is doing what it should" but how often do you have those in a real app?
- guiomie 13y agoI dont either.
- aidos 13y agoMe either - but I feel guilty about it. I get away with it as the sole developer, but it's really not a great practice.
- tomsaffell 13y agowe should form a support group -- i too feel guilty about our lack of test coverage. but honestly, i dont think its much of a problem. we know from user feedback that none of our big issues are bugs in our Angular code.
- guiomie 13y agoI do feel guilty. And hope my coworkers never browse the concerned projects in our repo.
- avty 13y agoNeither do I, even though Angular makes it trivial to write tests compared to most other frameworks.
- ulisesrmzroche 13y agoBarely ever, especially if you use JS as a functional language. I've seen most people setup the testing suite, but dealing with async is far too fiddly right now and thus tests/ is mostly boilerplate. Not that you shouldn't be testing your JS, but that the tooling gets in the way of shipping code.
- Ycros 13y agoAre you saying you test in other platforms, just not AngularJS? Or is your question actually about the value of automated testing of code in general? A strong point in AngularJS's favour when a bunch of my coworkers were evaluating different frameworks was that it was designed with testing in mind: dependency injection as a pervasive feature is huge for us, because that's what we've been doing on the server side (C#) for a long time. Angular seems to be encouraging its users to modularise code more, and that's a good thing. We have fairly comprehensive test coverage of our JS code, this is pretty easy if you take the happy default path of Karma and Jasmine. From my point of view, we've always had comprehensive server side testing, now that a lot of logic has shifted to the client and sits on top of a much lighter-weight API on the backend. All that JS code needs to be tested. Apart from lower level unit testing, we also have integration tests which drive real browsers through our apps. This is pretty important to make sure the whole thing including the server side code works together properly. These gain immense value as the project grows in size and complexity.