From: Scott González Date: Mon, 23 Mar 2015 22:37:03 +0000 (-0400) Subject: Tests: Update `domEqual()` to work with jQuery git X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1ca46175d564c7dde070819cbea9ea182585fec0;p=jquery-ui.git Tests: Update `domEqual()` to work with jQuery git jQuery now returns `null` for empty attributes instead of `undefined`. Ref gh-1516 (cherry picked from commit e4363ab82d0997a00c96e0f4b3a504a94ddfe62e) --- diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index 1c0f17859..0ef5d2117 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -301,11 +301,11 @@ window.domEqual = function( selector, modifier, message ) { result = {}; $.each( properties, function( index, attr ) { var value = elem.prop( attr ); - result[ attr ] = value !== undefined ? value : ""; + result[ attr ] = value != null ? value : ""; }); $.each( attributes, function( index, attr ) { var value = elem.attr( attr ); - result[ attr ] = value !== undefined ? value : ""; + result[ attr ] = value != null ? value : ""; }); result.style = getElementStyles( elem[ 0 ] ); result.events = $._data( elem[ 0 ], "events" );