Yahoo! recommends YUI 3. Learn about YUI 3 Test on YUILibrary.com.
YUI Test is a JavaScript testing framework with a comprehensive assertion syntax. It is suitable for testing YUI-based code, of course, but it is expressly designed to support test-driven development across any JavaScript project, regardless of whether YUI is involved.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.

Copyright © 2013 Yahoo! Inc. All rights reserved.