Tests: Update domEqual() to work with jQuery git

jQuery now returns `null` for empty attributes instead of `undefined`.

Ref gh-1516
This commit is contained in:
Scott González 2015-03-23 18:37:03 -04:00
parent 12643739a9
commit e4363ab82d

View File

@ -305,11 +305,11 @@ window.domEqual = function( selector, modifier, message ) {
result = {}; result = {};
$.each( properties, function( index, attr ) { $.each( properties, function( index, attr ) {
var value = elem.prop( attr ); var value = elem.prop( attr );
result[ attr ] = value !== undefined ? value : ""; result[ attr ] = value != null ? value : "";
}); });
$.each( attributes, function( index, attr ) { $.each( attributes, function( index, attr ) {
var value = elem.attr( attr ); var value = elem.attr( attr );
result[ attr ] = value !== undefined ? value : ""; result[ attr ] = value != null ? value : "";
}); });
result.style = getElementStyles( elem[ 0 ] ); result.style = getElementStyles( elem[ 0 ] );
result.events = $._data( elem[ 0 ], "events" ); result.events = $._data( elem[ 0 ], "events" );