File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -839,6 +839,7 @@ namespace Harness {
839
839
const sourceFile = createSourceFileAndAssertInvariants ( fileName , file . content , scriptTarget ) ;
840
840
const path = ts . toPath ( file . unitName , currentDirectory , getCanonicalFileName ) ;
841
841
fileMap . set ( path , sourceFile ) ;
842
+ fileMap . set ( < ts . Path > fileName , sourceFile ) ;
842
843
}
843
844
}
844
845
@@ -875,8 +876,8 @@ namespace Harness {
875
876
getCanonicalFileName,
876
877
useCaseSensitiveFileNames : ( ) => useCaseSensitiveFileNames ,
877
878
getNewLine : ( ) => newLine ,
878
- fileExists : fileName => getSourceFile ( fileName , ts . ScriptTarget . ES5 ) !== undefined ,
879
- readFile : ( fileName : string ) : string => { throw new Error ( "NotYetImplemented" ) ; }
879
+ fileExists : fileName => fileMap . contains ( < ts . Path > ts . normalizePath ( fileName ) ) ,
880
+ readFile : ( fileName : string ) : string => fileMap . get ( < ts . Path > ts . normalizePath ( fileName ) ) . getText ( )
880
881
} ;
881
882
}
882
883
You can’t perform that action at this time.
0 commit comments