apache/cordova-node-xcode

Internal pbxProject.prototype.addTargetDependency call not properly tested

Closed this issue · 0 comments

From Stryker mutation testing (see PR #61) of WatchKit 2 support (PR #56), I discovered that the following change does not trigger a test failure:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index be9f473..5a7702a 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1483,7 +1483,7 @@ pbxProject.prototype.addTarget = function(name, type, subfolder) {
     this.addToPbxProjectSection(target);
 
     // Target: Add dependency for this target to first (main) target
-    this.addTargetDependency(this.getFirstTarget().uuid, [target.uuid]);
+    this.addTargetDependency(this.getFirstTarget().uuid, []);
 
 
     // Return target on success

I think test coverage of this possible mutation needs to be added before we merge PR #56, which moves this piece of code into the else clause of an if statement.

/cc @l3ender