YUI 2.5.1 has been released. This includes a fix to the Cookie utility for a subcookie parsing issue that was brought to my attention. Always a nice way to start the work day, I might add.

So I quickly created a new test case using YUI Test and sure enough, it was broken. I then went through several iterations of changes, re-running the tests and finding that a minor change here affected a lot of functionality. Have I mentioned how much I love unit testing? After I finally got a fix and made sure all the tests passed, I knew the work was done and I felt assured that there were no regressions.

I’ve actually developed most of the Cookie utility using YUI Test and it has saved my butt on a number of occasions. I’m working on putting together a talk about JavaScript unit testing using YUI Test (still waiting to hear back from a certain conference….nudge, nudge), and I’m so glad I’ll be able to give a concrete example of how it can be useful.

Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.

Both comments and pings are currently closed.