Skip to content

Commit 8cc7953

Browse files
committed
use \r\n as default new line in transpile
1 parent da009b8 commit 8cc7953

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/cases/unittests/transpile.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ module ts {
2323
function test(input: string, testSettings: TranspileTestSettings): void {
2424

2525
let transpileOptions: TranspileOptions = testSettings.options || {};
26+
if (!transpileOptions.compilerOptions) {
27+
transpileOptions.compilerOptions = {};
28+
}
29+
if(transpileOptions.compilerOptions.newLine === undefined) {
30+
// use \r\n as default new line
31+
transpileOptions.compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed;
32+
}
2633

2734
let canUseOldTranspile = !transpileOptions.renamedDependencies;
2835

0 commit comments

Comments
 (0)