diff options
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/bootstrap.js | 10 | ||||
-rw-r--r-- | tests/lib/qunit.js | 9 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js index 6d608f2eb..7ca1bbda7 100644 --- a/tests/lib/bootstrap.js +++ b/tests/lib/bootstrap.js @@ -10,13 +10,15 @@ window.requirejs = { "lib": "../../lib", "phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge", "qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes", + "qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close", "qunit": "../../../external/qunit/qunit", "ui": "../../../ui" }, shim: { "globalize/ja-JP": [ "globalize" ], "jquery-simulate": [ "jquery" ], - "qunit-assert-classes": [ "qunit" ] + "qunit-assert-classes": [ "qunit" ], + "qunit-assert-close": [ "qunit" ] } }; @@ -43,11 +45,9 @@ function requireModules( dependencies, callback, modules ) { // Load a set of test file along with the required test infrastructure function requireTests( dependencies, noBackCompat ) { dependencies = [ - "../../lib/qunit", + "lib/qunit", noBackCompat ? "jquery-no-back-compat" : "jquery", - "jquery-simulate", - "qunit-assert-classes", - "../../lib/qunit-assert-domequal" + "jquery-simulate" ].concat( dependencies ); requireModules( dependencies, function( QUnit ) { diff --git a/tests/lib/qunit.js b/tests/lib/qunit.js index 5b0be5d23..757b6a501 100644 --- a/tests/lib/qunit.js +++ b/tests/lib/qunit.js @@ -1,6 +1,9 @@ define( [ "qunit", "jquery", + "qunit-assert-classes", + "qunit-assert-close", + "lib/qunit-assert-domequal", "phantom-bridge" ], function( QUnit, $ ) { @@ -40,12 +43,6 @@ QUnit.reset = ( function( reset ) { }; } )( QUnit.reset ); -// 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 ); -}; - return QUnit; } ); |