diff options
author | kborchers <kris.borchers@gmail.com> | 2012-04-19 11:19:52 -0500 |
---|---|---|
committer | kborchers <kris.borchers@gmail.com> | 2012-04-19 11:19:52 -0500 |
commit | c16bd7c510cff4e0b01d9c191128af014523da7c (patch) | |
tree | fd50c26fd0a0408c0f44380a9f75dd618be2719e /tests/unit/menu/menu_test_helpers.js | |
parent | 163555d7bf27fe5d272e404de3c4439902710f54 (diff) | |
download | jquery-ui-c16bd7c510cff4e0b01d9c191128af014523da7c.tar.gz jquery-ui-c16bd7c510cff4e0b01d9c191128af014523da7c.zip |
Menu tests: Don't pollute the global namespace with helpers.
Diffstat (limited to 'tests/unit/menu/menu_test_helpers.js')
-rw-r--r-- | tests/unit/menu/menu_test_helpers.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/unit/menu/menu_test_helpers.js b/tests/unit/menu/menu_test_helpers.js index e83795e5a..a576af19a 100644 --- a/tests/unit/menu/menu_test_helpers.js +++ b/tests/unit/menu/menu_test_helpers.js @@ -1,14 +1,16 @@ -function menu_log( message, clear ) { - if ( clear ) { - $( "#log" ).empty(); - } - if ( message === undefined ) { - message = $( "#log" ).data( "lastItem" ); - } - $( "#log" ).prepend( $.trim( message ) + "," ); -} +TestHelpers.menu = { + log: function( message, clear ) { + if ( clear ) { + $( "#log" ).empty(); + } + if ( message === undefined ) { + message = $( "#log" ).data( "lastItem" ); + } + $( "#log" ).prepend( $.trim( message ) + "," ); + }, -function menu_click( menu, item ) { - $( "#log" ).data( "lastItem", item ); - menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" ); -}
\ No newline at end of file + click: function( menu, item ) { + $( "#log" ).data( "lastItem", item ); + menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" ); + } +};
\ No newline at end of file |