Make test failure more readable

This commit is contained in:
Arthur Ozga 2016-11-07 19:03:25 -08:00
parent 8c35185b37
commit bc1bb0e7f1

View File

@ -2047,7 +2047,7 @@ namespace FourSlash {
const actualText = this.rangeText(ranges[0]);
if (this.removeWhitespace(actualText) !== this.removeWhitespace(expectedText)) {
this.raiseError(`Actual text doesn't match expected text. Actual: '${actualText}' Expected: '${expectedText}'`);
this.raiseError(`Actual text doesn't match expected text. Actual:\n'${actualText}'\nExpected:\n'${expectedText}'`);
}
}
@ -2084,7 +2084,7 @@ namespace FourSlash {
const actualContents: string = this.getFileContent(fileName);
if (this.removeWhitespace(actualContents) !== this.removeWhitespace(expectedContents)) {
this.raiseError(`Actual text doesn't match expected text. Actual:\n${actualContents}\n\nExpected:\n\n${expectedContents}`);
this.raiseError(`Actual text doesn't match expected text. Actual:\n${actualContents}\n\nExpected:\n${expectedContents}`);
}
}