YUI recommends YUI 3.

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

Yahoo! UI Library

yuitest  2.5.0

Yahoo! UI Library > yuitest > YAHOO.tool.TestCase

Show Private Show Protected

Class YAHOO.tool.TestCase

Test case containing various tests to run.


YAHOO.tool.TestCase ( template )
template <object> An object containing any number of test methods, other methods, an optional name, and anything else the test case needs.



Void resume ( segment )
Resumes a paused test and runs the given function.
segment <Function> (Optional) The function to run. If omitted, the test automatically passes.
Returns: Void


Void setUp ( )
Function to run before each test is executed.
Returns: Void


Void tearDown ( )
Function to run after each test is executed.
Returns: Void


Void wait ( segment , delay )
Causes the test case to wait a specified amount of time and then continue executing the given code.
segment <Function> (Optional) The function to run after the delay. If omitted, the TestRunner will wait until resume() is called.
delay <int> (Optional) The number of milliseconds to wait before running the function. If omitted, defaults to zero.
Returns: Void

Copyright © 2007 Yahoo! Inc. All rights reserved.