diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 9ed515eb5b60b..23cdfdfb7c525 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -45,10 +45,12 @@ module Utils { export function getExecutionEnvironment() { if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { return ExecutionEnvironment.CScript; - } else if (typeof window !== "undefined") { + } + else if (typeof window !== "undefined") { return ExecutionEnvironment.Browser; - } else { - return ExecutionEnvironment.Node; + } + else { + return ExecutionEnvironment.Node; } } @@ -945,6 +947,7 @@ module Harness { options = options || { noResolve: false }; options.target = options.target || ts.ScriptTarget.ES3; options.module = options.module || ts.ModuleKind.None; + options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; options.noErrorTruncation = true; if (settingsCallback) { diff --git a/tests/baselines/reference/contextualTyping1.js b/tests/baselines/reference/contextualTyping1.js index 7f1e12c744b4e..7ceb3b582e56a 100644 --- a/tests/baselines/reference/contextualTyping1.js +++ b/tests/baselines/reference/contextualTyping1.js @@ -2,4 +2,4 @@ var foo: {id:number;} = {id:4}; //// [contextualTyping1.js] -var foo = { id: 4 };\n \ No newline at end of file +var foo = { id: 4 };