Skip to content

Commit c974b2c

Browse files
author
Josh Goldberg
committed
Helps to check in the test changes, too
1 parent bc9ad90 commit c974b2c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/compiler/watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace ts {
4545
}
4646

4747
/** @internal */
48-
const screenStartingMessageCodes: number[] = [
48+
export const screenStartingMessageCodes: number[] = [
4949
Diagnostics.Starting_compilation_in_watch_mode.code,
5050
Diagnostics.File_change_detected_Starting_incremental_compilation.code,
5151
];

src/harness/unittests/tscWatchMode.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ namespace ts.tscWatch {
124124
}
125125

126126
function getWatchDiagnosticWithoutDate(diagnostic: Diagnostic) {
127-
return ` - ${flattenDiagnosticMessageText(diagnostic.messageText, host.newLine)}${host.newLine + host.newLine + host.newLine}`;
127+
const newLines = contains(screenStartingMessageCodes, diagnostic.code)
128+
? `${host.newLine}${host.newLine}`
129+
: host.newLine;
130+
return ` - ${flattenDiagnosticMessageText(diagnostic.messageText, host.newLine)}${newLines}`;
128131
}
129132
}
130133

0 commit comments

Comments
 (0)