aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/testsuite.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-03-31 16:52:28 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:24:45 -0400
commit2e1c72fb59b3e41da15ebcd83640dbdf13a90d27 (patch)
tree0a294a24d275202594cd4953843c73f5105677cc /tests/unit/testsuite.js
parent7c896ddb8563e1f4fc655904614cf72d010e2ecb (diff)
downloadjquery-ui-2e1c72fb59b3e41da15ebcd83640dbdf13a90d27.tar.gz
jquery-ui-2e1c72fb59b3e41da15ebcd83640dbdf13a90d27.zip
Tests: Convert closeEnough() to a proper QUnit assertion
Should eventually replace with qunit-assert-close. Ref #10119 Ref gh-1528
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r--tests/unit/testsuite.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index e03fd8f67..59e40af43 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -224,8 +224,8 @@ TestHelpers.forceScrollableWindow = function( appendTo ) {
}).appendTo( appendTo || "#qunit-fixture" );
};
-// Taken from https://github.com/jquery/qunit/tree/master/addons/close-enough
-window.closeEnough = function( actual, expected, maxDifference, message ) {
+// TODO: switch to qunit-assert-close plugin
+QUnit.assert.close = function( actual, expected, maxDifference, message ) {
var passes = ( actual === expected ) || Math.abs( actual - expected ) <= maxDifference;
QUnit.push( passes, actual, expected, message );
};