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

Yahoo! UI Library > yuitest > YAHOO.tool.TestCase
Search:
 
Filters

Class YAHOO.tool.TestCase

Test case containing various tests to run.

Constructor

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

Methods

resume

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

setUp

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

tearDown

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

wait

Void wait ( segment , delay )
Causes the test case to wait a specified amount of time and then continue executing the given code.
Parameters:
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.


Copyright © 2010 Yahoo! Inc. All rights reserved.