Skip to content

Commit 8f6c656

Browse files
committed
Core: Make uniqueId test pass in IE6/7 with jQuery 1.6, where undefined id is returned as empty string
1 parent 392423c commit 8f6c656

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/core/core.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,13 @@ test( "outerHeight(true) - setter", function() {
156156
test( "uniqueId / removeUniqueId", function() {
157157
var el = $( "img" ).eq( 0 );
158158

159-
equal( el.attr( "id" ), undefined, "element has no initial id" );
159+
// TODO use equal(id, undefined) when dropping jQuery 1.6 support (or IE6/7)
160+
ok( !el.attr( "id" ), "element has no initial id" );
160161
el.uniqueId();
161162
ok( /ui-id-\d+$/.test( el.attr( "id" ) ), "element has generated id" );
162163
el.removeUniqueId();
163-
equal( el.attr( "id" ), undefined, "unique id has been removed from element" );
164+
// TODO see above
165+
ok( !el.attr( "id" ), "unique id has been removed from element" );
164166
});
165167

166168
})( jQuery );

0 commit comments

Comments
 (0)