Skip to content
Browse files

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 gh-1275
  • Loading branch information
tjvantoll committed Jun 23, 2014
1 parent a0fea7d commit c29b4434b6c09c3ddee705be46e2b00462499880
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/unit/selectmenu/selectmenu_options.js
@@ -98,7 +98,7 @@ test( "Width", function() {

equal( button.outerWidth(), element.outerWidth(), "button width auto" );
element.selectmenu( "open" );
equal( menu.outerWidth(), element.outerWidth(), "menu width auto" );
closeEnough( menu.outerWidth(), element.outerWidth(), 2, "menu width auto" );

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

0 comments on commit c29b443

Please sign in to comment.
You can’t perform that action at this time.