diff --git a/src/harness/harness.ts b/src/harness/harness.ts index e2f3f971da3..b9bef19bfa8 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -942,7 +942,8 @@ module Harness { result.sourceMaps.forEach(writeFile); }, /*settingsCallback*/ () => { }, - this.compileOptions); + this.compileOptions, + /*currentDirectory*/ undefined); function writeFile(file: GeneratedFile) { ioHost.writeFile(file.fileName, file.code, false); @@ -955,8 +956,7 @@ module Harness { settingsCallback?: (settings: ts.CompilerOptions) => void, options?: ts.CompilerOptions, // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file - currentDirectory?: string, - assertInvariants = true) { + currentDirectory?: string) { options = options || { noResolve: false }; options.target = options.target || ts.ScriptTarget.ES3; diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index 76331b8dc7d..43a118b6aec 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -106,14 +106,14 @@ module RWC { opts.options.noLib = true; // Emit the results - compilerOptions = harnessCompiler.compileFiles(inputFiles, otherFiles, compileResult => { - compilerResult = compileResult; - }, + compilerOptions = harnessCompiler.compileFiles( + inputFiles, + otherFiles, + newCompilerResults => { compilerResult = newCompilerResults; }, /*settingsCallback*/ undefined, opts.options, - // Since all Rwc json file specified current directory in its json file, we need to pass this information to compilerHost - // so that when the host is asked for current directory, it should give the value from json rather than from process - currentDirectory, - /*assertInvariants:*/ false); + // Since each RWC json file specifies its current directory in its json file, we need + // to pass this information in explicitly instead of acquiring it from the process. + currentDirectory); }); function getHarnessCompilerInputUnit(fileName: string) {