Hacker News new | past | comments | ask | show | jobs | submit login
Headless unit testing of Raphael.js is possible, and it's awesome (trottercashion.com)
4 points by trotter_cashion on April 27, 2010 | hide | past | favorite | 2 comments



This is a bad example -- the unit test is just a recapitulation of the implementation! I hope the real tests aren't like this, in which case a real example would be a lot more convincing.


Yea, the purpose of the test is more to assert that the correct things are being called on Raphael. Since the actual code is so simplistic, these tests really aren't testing that much. In our actual implementation, the tests are actually testing legit logic.

I think that more important point of the post is that it is possible to test javascript graphics on the command line. That's something that's typically considered fairly difficult.




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

Search: