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

Yahoo! UI Library > yuitest > YAHOO.util.ObjectAssert

Show Private Show Protected

static Class YAHOO.util.ObjectAssert

The ObjectAssert object provides functions to test JavaScript objects for a variety of cases.

Methods

hasProperty

static void hasProperty ( propertyName , object , message )
Asserts that an object has a property with the given name.
Parameters:
propertyName <String> The name of the property to test.
object <Object> The object to search.
message <String> (Optional) The message to display if the assertion fails.
Returns: void

propertiesAreEqual

static void propertiesAreEqual ( expected , actual , message )
Asserts that all properties in the object exist in another object.
Parameters:
expected <Object> An object with the expected properties.
actual <Object> An object with the actual properties.
message <String> (Optional) The message to display if the assertion fails.
Returns: void


Copyright © 2007 Yahoo! Inc. All rights reserved.