mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Spit out JSON when expected =/= actual.
This commit is contained in:
parent
2539ebe29f
commit
b9ddfcc082
@ -891,7 +891,7 @@ module FourSlash {
|
||||
}
|
||||
|
||||
if (ranges.length !== references.length) {
|
||||
this.raiseError(this.assertionMessage("Rename locations", references.length, ranges.length));
|
||||
this.raiseError("Rename location count does not match result.\n\nExpected: " + JSON.stringify(ranges) + "\n\nActual:" + JSON.stringify(references));
|
||||
}
|
||||
|
||||
ranges = ranges.sort((r1, r2) => r1.start - r2.start);
|
||||
@ -904,9 +904,7 @@ module FourSlash {
|
||||
if (reference.textSpan.start !== range.start ||
|
||||
ts.textSpanEnd(reference.textSpan) !== range.end) {
|
||||
|
||||
this.raiseError(this.assertionMessage("Rename location",
|
||||
"[" + reference.textSpan.start + "," + ts.textSpanEnd(reference.textSpan) + ")",
|
||||
"[" + range.start + "," + range.end + ")"));
|
||||
this.raiseError("Rename location results do not match.\n\nExpected: " + JSON.stringify(ranges) + "\n\nActual:" + JSON.stringify(references));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user