aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/testsuite.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-02 20:35:18 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-05-02 20:35:49 +0200
commit5c4709882944fbd9800ecaab79d42cb9e3b5d96c (patch)
tree0ecadfda2ea64f517dbbebb681517c11ad288c09 /tests/unit/testsuite.js
parent0496a50238a47463c171219b6370173874193130 (diff)
downloadjquery-ui-5c4709882944fbd9800ecaab79d42cb9e3b5d96c.tar.gz
jquery-ui-5c4709882944fbd9800ecaab79d42cb9e3b5d96c.zip
Add simple error handling for domEqual method (was failing for menu, output not helpful).
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r--tests/unit/testsuite.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index 4b273ce78..c1f394ed9 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -75,6 +75,10 @@ window.domEqual = function( selector, modifier, message ) {
var attributes = ["class", "role", "id", "tabIndex", "aria-activedescendant"];
function extract(value) {
+ if (!value || !value.length) {
+ QUnit.push( false, actual, expected, "domEqual failed, can't extract " + selector + ", message was: " + message );
+ return;
+ }
var result = {};
result.nodeName = value[0].nodeName;
$.each(attributes, function(index, attr) {