From 1a6022d6dd43564a496b8b63a4818832513d5857 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 25 Oct 2017 17:04:41 -0700 Subject: [PATCH] Stop using expensive directoryExists in unit/rwc tests where it does not matter (#19486) --- src/harness/harness.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 9622a6df332..b867ca77628 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1196,6 +1196,9 @@ namespace Harness { traceResults = []; compilerHost.trace = text => traceResults.push(text); } + else { + compilerHost.directoryExists = () => true; // This only visibly affects resolution traces, so to save time we always return true where possible + } const program = ts.createProgram(programFileNames, options, compilerHost); const emitResult = program.emit();