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.

Comments

  1. Shaffer

    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!

  2. Jim Minatel

    Congrats on the YUI release. 1 job, multiple books, just not enough to keep you busy, you have to create more work for yourself!

  3. Ganeshji Marwaha

    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.

  4. Nicholas C. Zakas

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

Understanding JavaScript Promises E-book Cover

Demystify JavaScript promises with the e-book that explains not just concepts, but also real-world uses of promises.

Download the Free E-book!

The community edition of Understanding JavaScript Promises is a free download that arrives in minutes.