Skip to content

Commit 4b92e25

Browse files
committed
Merge pull request #3155 from Microsoft/useCRLFByDefaultInTest
Use crlf by default in test
2 parents ce98da3 + af3d67d commit 4b92e25

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/harness/harness.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ module Utils {
4545
export function getExecutionEnvironment() {
4646
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
4747
return ExecutionEnvironment.CScript;
48-
} else if (typeof window !== "undefined") {
48+
}
49+
else if (typeof window !== "undefined") {
4950
return ExecutionEnvironment.Browser;
50-
} else {
51-
return ExecutionEnvironment.Node;
51+
}
52+
else {
53+
return ExecutionEnvironment.Node;
5254
}
5355
}
5456

@@ -945,6 +947,7 @@ module Harness {
945947
options = options || { noResolve: false };
946948
options.target = options.target || ts.ScriptTarget.ES3;
947949
options.module = options.module || ts.ModuleKind.None;
950+
options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed;
948951
options.noErrorTruncation = true;
949952

950953
if (settingsCallback) {

tests/baselines/reference/contextualTyping1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
var foo: {id:number;} = {id:4};
33

44
//// [contextualTyping1.js]
5-
var foo = { id: 4 };\n
5+
var foo = { id: 4 };

0 commit comments

Comments
 (0)