@@ -234,13 +234,13 @@ export function main() {
234234 } ) ;
235235
236236 it ( 'should simplify a module reference across modules' , ( ) => {
237- expect ( crossModuleSimplify ( { moduleId : '' , filePath : '/src/cases' } ,
237+ expect ( crossModuleSimplify ( new ModuleContext ( '' , '/src/cases' ) ,
238238 ( { __symbolic : "reference" , module : "./extern" , name : "s" } ) ) )
239239 . toEqual ( "s" ) ;
240240 } ) ;
241241
242242 it ( 'should simplify a module reference without crossing modules' , ( ) => {
243- expect ( singleModuleSimplify ( { moduleId : '' , filePath : '/src/cases' } ,
243+ expect ( singleModuleSimplify ( new ModuleContext ( '' , '/src/cases' ) ,
244244 ( { __symbolic : "reference" , module : "./extern" , name : "s" } ) ) )
245245 . toEqual ( host . getStaticSymbol ( '' , '/src/extern.d.ts' , 's' ) ) ;
246246 } ) ;
@@ -261,7 +261,7 @@ class MockReflectorHost implements StaticReflectorHost {
261261 }
262262
263263 // In tests, assume that symbols are not re-exported
264- findDeclaration ( modulePath : string , symbolName : string , containingFile : string ) : StaticSymbol {
264+ findDeclaration ( modulePath : string , symbolName : string , containingFile ? : string ) : StaticSymbol {
265265 function splitPath ( path : string ) : string [ ] { return path . split ( / \/ | \\ / g) ; }
266266
267267 function resolvePath ( pathParts : string [ ] ) : string {
@@ -294,7 +294,7 @@ class MockReflectorHost implements StaticReflectorHost {
294294
295295 if ( modulePath . indexOf ( '.' ) === 0 ) {
296296 return this . getStaticSymbol ( `mod/${ symbolName } ` , pathTo ( containingFile , modulePath ) + '.d.ts' ,
297- symbolName ) ;
297+ symbolName ) ;
298298 }
299299 return this . getStaticSymbol ( `mod/${ symbolName } ` , '/tmp/' + modulePath + '.d.ts' , symbolName ) ;
300300 }
0 commit comments