Ok, not a very deep post, but my buddy Tai over at Luxurious Animals just told me a story on IM I couldn't resist sharing.
He built a nice animation of birds in flight, and after implementing a fix, someone reported that the birds no longer moved.
That user went home and this morning, reported that the birds were in their final position.
Why?
Turns out that someone swapped out a JavaScript library and the duration value went from milliseconds to seconds. The animation now takes almost 28 hours to complete. (But hey, it still works, right?)
Woot. This is why I love client-side development. ;)
Archived Comments
And that's why teams with really good automated tests love their existence!
Amen. I wonder if Selenium can handle testing timed events like this?
Possibly. If not, some of the js testing frameworks might come in handy. I think that it perfectly highlights the difficulty of writing good/any tests though. I think that is probably why so many of us fall short with testing - with time constraints, it is the easiest thing for us to let go of and the hardest to keep; the client won't care after all...(!?!)
With Sinon.js, I believe you could have tested this functionality:
http://sinonjs.org/docs/#clock