Skip to content

Commit 70d25ae

Browse files
committed
Updating to latest QUnit
1 parent eccb95a commit 70d25ae

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

external/qunit.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -953,16 +953,14 @@ QUnit.jsDump = (function() {
953953
type = "date";
954954
} else if (QUnit.is("Function", obj)) {
955955
type = "function";
956-
} else if (QUnit.is("Array", obj)) {
957-
type = "array";
958-
} else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
956+
} else if (obj.setInterval && obj.document && !obj.nodeType) {
959957
type = "window";
960-
} else if (QUnit.is("HTMLDocument", obj)) {
958+
} else if (obj.nodeType === 9) {
961959
type = "document";
962-
} else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
963-
type = "nodelist";
964-
} else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
960+
} else if (obj.nodeType) {
965961
type = "node";
962+
} else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
963+
type = "array";
966964
} else {
967965
type = typeof obj;
968966
}

0 commit comments

Comments
 (0)