My first YUI release
There’s a common misconception out there that I’m part of the YUI team. Well, I’m not (I work on My Yahoo!), but that didn’t stop me from submitting some code to be included in the 2.3.0 release (details). I’ve been secretly working on this little creation for the past few months and now that the release is here, I can finally talk about it.
The 2.3.0 release of YUI is the first to include my unit testing framework, unimaginatively named YUI Test. The basic idea was to create a super simple way to write unit tests for JavaScript. I really like unit testing, but found most of the JavaScript options to take too much time to get up and running. With YUI Test, you can include a couple of files and quickly write and run a test case. There’s tons of assertions geared towards common JavaScript data types and the default failure messages are helpful enough such that you don’t really need to provide custom ones (though that is an option).
I’ll be talking more about YUI Test in the coming weeks and months, but for now, check out the documentation and I hope you enjoy the wonderful world of unit testing.
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.




4 Comments
Hey,
Just took a quick look at your YUI Test stuff…highly impressive. We’re just (unfortunately) getting into "test driven development" (I doubt it’ll ever truly become religion) so the whole category is very interesting to me…if not old hat since a job 5 years ago it was the only way we did it. But I really like what you’ve done, very nice addition to YUI and Javascript in general.
Unrelated comment: I’m going to be diving deeper into the new book and it’s wiki…I’ve been slammed (personal stuff) and now that things have normalized, I hope to add a little more value!
Shaffer on August 1st, 2007 at 12:49 pm
Congrats on the YUI release. 1 job, multiple books, just not enough to keep you busy, you have to create more work for yourself!
Jim Minatel on August 3rd, 2007 at 10:57 pm
I didn’t look into the YUITest framework yet, but just wanted to know something quickly. Can this framework be used outside YUI, maybe for app written with another framework like prototype or jquery.
Ganeshji Marwaha on August 6th, 2007 at 6:14 pm
@Ganeshji – you can use it to test whatever you want. You will need to load the base YUI files first, but you can use it to test anything.
Nicholas C. Zakas on August 7th, 2007 at 2:59 pm
Comments are automatically closed after 14 days.