From 23655f0dbdd0fff8498440ada710a32ad3ffc974 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Wed, 10 May 2023 10:56:02 +0200 Subject: [PATCH] Tests: Fix selectmenu width tests in Firefox with jQuery 3.0 & 3.1 jQuery 3.0 & 3.1 used `getBoundingClientRect()` in its `width`/`height` calculations and that causes minor differences in fractional width computations. Allow a tiny delta in tests to fix those tests breaking in Firefox. Ref jquery/jquery#3561 Closes gh-2159 --- tests/unit/selectmenu/options.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/selectmenu/options.js b/tests/unit/selectmenu/options.js index 4a070f4eb..7e716394c 100644 --- a/tests/unit/selectmenu/options.js +++ b/tests/unit/selectmenu/options.js @@ -101,7 +101,7 @@ QUnit.test( "width", function( assert ) { assert.equal( button[ 0 ].style.width, "", "no inline style" ); element.selectmenu( "option", "width", null ); - assert.equal( button.outerWidth(), element.outerWidth(), "button width auto" ); + assert.close( button.outerWidth(), element.outerWidth(), 0.01, "button width auto" ); element.outerWidth( 100 ); element.selectmenu( "refresh" ); @@ -117,7 +117,8 @@ QUnit.test( "width", function( assert ) { .append( $( "