@@ -16,7 +16,7 @@ describe('getInfo', () => {
1616 it ( 'handles non-project / workspace locations in a ' , ( ) => {
1717 const name = `YourProjectName` ;
1818 ( fs . readFileSync as jest . Mock )
19- . mockReturnValueOnce ( `<?xml version="1.0" encoding="UTF-8"?>
19+ . mockReturnValueOnce ( `<?xml version="1.0" encoding="UTF-8"?>
2020<Workspace
2121 version = "1.0">
2222 <FileRef
@@ -32,6 +32,34 @@ describe('getInfo', () => {
3232 ( execa . sync as jest . Mock ) . mockReturnValue ( { stdout : '{}' } ) ;
3333 getInfo ( { isWorkspace : true , name} as IOSProjectInfo , 'some/path' ) ;
3434
35+ const execaSync = execa . sync as jest . Mock ;
36+ // Should not call on Pods or the other misc groups
37+ expect ( execaSync . mock . calls ) . toEqual ( [
38+ [
39+ 'xcodebuild' ,
40+ [ '-list' , '-json' , '-project' , `some/path/${ name } .xcodeproj` ] ,
41+ ] ,
42+ ] ) ;
43+ } ) ;
44+ it ( 'handles xcodeproj location in container in a ' , ( ) => {
45+ const name = `YourProjectName` ;
46+ ( fs . readFileSync as jest . Mock )
47+ . mockReturnValueOnce ( `<?xml version="1.0" encoding="UTF-8"?>
48+ <Workspace
49+ version = "1.0">
50+ <FileRef
51+ location = "container:${ name } .xcodeproj">
52+ </FileRef>
53+ <FileRef
54+ location = "group:Pods/Pods.xcodeproj">
55+ </FileRef>
56+ <FileRef
57+ location = "group:container/some_other_file.mm">
58+ </FileRef>
59+ </Workspace>` ) ;
60+ ( execa . sync as jest . Mock ) . mockReturnValue ( { stdout : '{}' } ) ;
61+ getInfo ( { isWorkspace : true , name} as IOSProjectInfo , 'some/path' ) ;
62+
3563 const execaSync = execa . sync as jest . Mock ;
3664 // Should not call on Pods or the other misc groups
3765 expect ( execaSync . mock . calls ) . toEqual ( [
0 commit comments