Skip to content

Commit bc1bb0e

Browse files
committed
Make test failure more readable
1 parent 8c35185 commit bc1bb0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/harness/fourslash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ namespace FourSlash {
20472047
const actualText = this.rangeText(ranges[0]);
20482048

20492049
if (this.removeWhitespace(actualText) !== this.removeWhitespace(expectedText)) {
2050-
this.raiseError(`Actual text doesn't match expected text. Actual: '${actualText}' Expected: '${expectedText}'`);
2050+
this.raiseError(`Actual text doesn't match expected text. Actual:\n'${actualText}'\nExpected:\n'${expectedText}'`);
20512051
}
20522052
}
20532053

@@ -2084,7 +2084,7 @@ namespace FourSlash {
20842084

20852085
const actualContents: string = this.getFileContent(fileName);
20862086
if (this.removeWhitespace(actualContents) !== this.removeWhitespace(expectedContents)) {
2087-
this.raiseError(`Actual text doesn't match expected text. Actual:\n${actualContents}\n\nExpected:\n\n${expectedContents}`);
2087+
this.raiseError(`Actual text doesn't match expected text. Actual:\n${actualContents}\n\nExpected:\n${expectedContents}`);
20882088
}
20892089
}
20902090

0 commit comments

Comments
 (0)