diff options
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r-- | tests/unit/testsuite.js | 4 |
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) { |