Skip to content

Commit c29b443

Browse files
committed
Tests: Use closeEnough() to account for rounding differences
Selectmenu's test suite broke with b0e8380, which changed the padding used by the menu widget. Selectmenu conditionally adds pixels to the menu's width, and using closeEnough() accounts for that and the rounding differences across browsers. Closes jquerygh-1275
1 parent a0fea7d commit c29b443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/selectmenu/selectmenu_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ test( "Width", function() {
9898

9999
equal( button.outerWidth(), element.outerWidth(), "button width auto" );
100100
element.selectmenu( "open" );
101-
equal( menu.outerWidth(), element.outerWidth(), "menu width auto" );
101+
closeEnough( menu.outerWidth(), element.outerWidth(), 2, "menu width auto" );
102102

103103
element.outerWidth( 100 );
104104
element.selectmenu( "refresh" );

0 commit comments

Comments
 (0)