File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,6 +123,26 @@ exports.addTarget = {
123123
124124 test . done ( ) ;
125125 } ,
126+ 'should add target as a target dependency to the main target' : function ( test ) {
127+ var target = proj . addTarget ( TARGET_NAME , TARGET_TYPE ) ;
128+ test . ok ( target ) ;
129+ test . ok ( target . uuid ) ;
130+
131+ var pbxTargetDependencySection = proj . hash . project . objects [ 'PBXTargetDependency' ] ;
132+
133+ var targetDependencyUuid = Object . keys ( pbxTargetDependencySection ) . find ( ( key ) => pbxTargetDependencySection [ key ] . target === target . uuid ) ;
134+ test . ok ( targetDependencyUuid ) ;
135+
136+ var firstTarget = proj . getFirstTarget ( ) ;
137+ test . ok ( firstTarget ) ;
138+ test . ok ( firstTarget . firstTarget ) ;
139+ test . ok ( firstTarget . firstTarget . dependencies ) ;
140+
141+ var firstTargetMatchingDependency = firstTarget . firstTarget . dependencies . find ( ( elem ) => elem . value === targetDependencyUuid ) ;
142+ test . ok ( firstTargetMatchingDependency ) ;
143+
144+ test . done ( ) ;
145+ } ,
126146 'should have "wrapper.application" filetype for application product' : function ( test ) {
127147 var target = proj . addTarget ( TARGET_NAME , 'application' ) ;
128148 test . ok ( target ) ;
You can’t perform that action at this time.
0 commit comments