Hacker News new | past | comments | ask | show | jobs | submit login

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?



Are 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.


Barely 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.


I dont either.


Me either - but I feel guilty about it. I get away with it as the sole developer, but it's really not a great practice.


we 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.


I do feel guilty. And hope my coworkers never browse the concerned projects in our repo.


Neither do I, even though Angular makes it trivial to write tests compared to most other frameworks.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: