YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Simple Testing Example

This example shows basic usage of the YUI Test framework for testing browser-based JavaScript code. Two different TestCase objects are created and added to a TestSuite object. The TestRunner is then used to run the tests once the page has loaded.