@@ -458,6 +458,24 @@ describe('MetadataResolver', () => {
458
458
expect ( access . getComponentsFromPath ( path ) . length ) . to . equal ( 0 ) ;
459
459
} ) ;
460
460
461
+ it ( 'Should not throw TypeInferenceError for a non-metadata file that is not part of an inclusive filter' , ( ) => {
462
+ const emailservicesPath = join ( 'unpackaged' , 'emailservices' , 'MyEmailServices.xml' ) ;
463
+ const nonMetadataDirPath = join ( 'unpackaged' , 'datasets' ) ;
464
+ const nonMetadataFilePath = join ( nonMetadataDirPath , 'myDS.xml' ) ;
465
+ const emailservicesComponent = new SourceComponent (
466
+ {
467
+ name : 'MyEmailServices' ,
468
+ type : registry . types . emailservicesfunction ,
469
+ xml : emailservicesPath ,
470
+ } ,
471
+ VirtualTreeContainer . fromFilePaths ( [ emailservicesPath ] )
472
+ ) ;
473
+ const filter = new ComponentSet ( [ emailservicesComponent ] ) ;
474
+ const treeContainer = VirtualTreeContainer . fromFilePaths ( [ emailservicesPath , nonMetadataFilePath ] ) ;
475
+ const mdResolver = new MetadataResolver ( undefined , treeContainer , false ) ;
476
+ expect ( mdResolver . getComponentsFromPath ( nonMetadataDirPath , filter ) ) . to . deep . equal ( [ ] ) ;
477
+ } ) ;
478
+
461
479
it ( 'Should not return a component if path to folder metadata xml is forceignored' , ( ) => {
462
480
const path = xmlInFolder . FOLDER_XML_PATH ;
463
481
const access = testUtil . createMetadataResolver ( [
0 commit comments