Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@
msg = "Expected text '" + vExpected + "' instead of '" + vActual + "'";
break;
default:
//if they are the same class of objects and undefined nodeType, assumes attribute
//TODO remove when jsdom fix this
if (expected.constructor === actual.constructor) {
msg =
"Attribute '" +
expected.nodeName +
"': expected value '" +
vExpected +
"' instead of '" +
vActual +
"'";
break;
}
throw new Error("nodeValue is not equal, but nodeType is unexpected");
}
canContinue = true;
Expand Down