Skip to content

Commit b22e3c3

Browse files
committed
Tooltip tests: Added test for widget() method.
1 parent 0729194 commit b22e3c3

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/unit/tooltip/tooltip_methods.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,12 @@ test( "enable/disable", function() {
5959
$.fx.off = false;
6060
});
6161

62-
/*
63-
TODO currently tooltip doesn't override widget
64-
can't return anything useful if no element is kept around and there's no useful reference
65-
test("widget", function() {
66-
var tooltip = $("#tooltipped1").tooltip();
67-
deepEqual(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]);
68-
deepEqual(tooltip.tooltip("widget").end()[0], tooltip[0]);
62+
test( "widget", function() {
63+
expect( 2 );
64+
var element = $( "#tooltipped1" ).tooltip(),
65+
widgetElement = element.tooltip( "widget" );
66+
equal( widgetElement.length, 1, "one element" );
67+
strictEqual( widgetElement[ 0 ], element[ 0 ], "same element" );
6968
});
70-
*/
7169

7270
}( jQuery ) );

0 commit comments

Comments
 (0)