From d9112f5e989eb6d0e3b606ee73deff607a19b9e2 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sun, 13 Sep 2015 23:35:22 -0700 Subject: [PATCH] use resolvePath to handel relative references correctelly --- src/harness/loggedIO.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index 38c9cc7e795..46a791944b6 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -270,7 +270,7 @@ module Playback { } function findResultByPath(wrapper: { resolvePath(s: string): string }, logArray: { path: string; result?: T }[], expectedPath: string, defaultValue?: T): T { - let normalizedName = ts.normalizeSlashes(expectedPath).toLowerCase(); + let normalizedName = ts.normalizePath(expectedPath).toLowerCase(); // Try to find the result through normal fileName for (let i = 0; i < logArray.length; i++) { if (ts.normalizeSlashes(logArray[i].path).toLowerCase() === normalizedName) { @@ -286,6 +286,7 @@ module Playback { } } } + // If we got here, we didn't find a match if (defaultValue === undefined) { throw new Error("No matching result in log array for path: " + expectedPath);