diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index ac11fecbd3f..9a1f97395a0 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -424,6 +424,7 @@ module FourSlash { this.scenarioActions.push(''); if (actual !== expected) { + this.printErrorLog(false, errors); var errorMsg = "Actual number of errors (" + actual + ") does not match expected number (" + expected + ")"; Harness.IO.log(errorMsg); throw new Error(errorMsg); @@ -1894,7 +1895,6 @@ module FourSlash { { unitName: fileName, content: Harness.IO.readFile(fileName) } ]; harnessCompiler.addInputFiles(filesToAdd); - harnessCompiler.compile(); var emitterIOHost: Harness.Compiler.IEmitterIOHost = { writeFile: (path: string, contents: string, writeByteOrderMark: boolean) => fsOutput.Write(contents), diff --git a/tests/cases/fourslash/underscoreTyping1.ts b/tests/cases/fourslash/underscoreTyping1.ts index 06e8b979079..d4556e07f74 100644 --- a/tests/cases/fourslash/underscoreTyping1.ts +++ b/tests/cases/fourslash/underscoreTyping1.ts @@ -18,4 +18,4 @@ //// } goTo.position(0); -verify.numberOfErrorsInCurrentFile(3); +verify.numberOfErrorsInCurrentFile(2);