From bc1bb0e7f16c6cccc6ca1e1952bbe5e1d557726e Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Mon, 7 Nov 2016 19:03:25 -0800 Subject: [PATCH] Make test failure more readable --- src/harness/fourslash.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index e8e5c8e9597..b7ecf957cb1 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -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}`); } }