Fix tests for toEqual diff output in IE
- Merges #1236 from @benchristel
This commit is contained in:
committed by
Gregg Van Hove
parent
54e7a82ef3
commit
41a813521b
@@ -189,14 +189,24 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
||||
var aIsElement = a instanceof Element;
|
||||
var bIsElement = b instanceof Element;
|
||||
if (aIsElement && bIsElement) {
|
||||
return a.outerHTML == b.outerHTML;
|
||||
result = a.outerHTML == b.outerHTML;
|
||||
if (!result) {
|
||||
diffBuilder.record(a, b);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
if (aIsElement || bIsElement) {
|
||||
diffBuilder.record(a, b);
|
||||
return false;
|
||||
}
|
||||
return a.innerText == b.innerText && a.textContent == b.textContent;
|
||||
result = a.innerText == b.innerText && a.textContent == b.textContent;
|
||||
if (!result) {
|
||||
diffBuilder.record(a, b);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
if (aIsDomNode || bIsDomNode) {
|
||||
diffBuilder.record(a, b);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -363,7 +373,7 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
||||
|
||||
return 'Expected ' +
|
||||
path + ' to be a kind of ' +
|
||||
expected.constructor.name +
|
||||
j$.fnNameFor(expected.constructor) +
|
||||
', but was ' + j$.pp(actual) + '.';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user