Skip to content

Build of app_extension target is not covered by test suite #63

Description

@brody2consult

The following changes would not be detected by the existing test suite:

1:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..5894d91 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1466,19 +1466,6 @@ pbxProject.prototype.addTarget = function(name, type, subfolder) {
     // Target: Add to PBXNativeTarget section
     this.addToPbxNativeTargetSection(target)
 
-    // Product: Embed (only for "extension"-type targets)
-    if (targetType === 'app_extension') {
-
-        // Create CopyFiles phase in first target
-        this.addBuildPhase([], 'PBXCopyFilesBuildPhase', 'Copy Files', this.getFirstTarget().uuid,  targetType)
-
-        // Add product to CopyFiles phase
-        this.addToPbxCopyfilesBuildPhase(productFile)
-
-       // this.addBuildPhaseToTarget(newPhase.buildPhase, this.getFirstTarget().uuid)
-
-    };
-
     // Target: Add uuid to root project
     this.addToPbxProjectSection(target);
 

2:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..d7e65da 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1555,7 +1555,7 @@ function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName) {
      // Add additional properties for 'CopyFiles' build phase
     var DESTINATION_BY_TARGETTYPE = {
         application: 'wrapper',
-        app_extension: 'plugins',
+        app_extension: '',
         bundle: 'wrapper',
         command_line_tool: 'wrapper',
         dynamic_library: 'products_directory',

3:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..7301a16 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1555,7 +1555,6 @@ function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName) {
      // Add additional properties for 'CopyFiles' build phase
     var DESTINATION_BY_TARGETTYPE = {
         application: 'wrapper',
-        app_extension: 'plugins',
         bundle: 'wrapper',
         command_line_tool: 'wrapper',
         dynamic_library: 'products_directory',

I think the test coverage is needed to help ensure the functionality would not be broken by future changes.

Detected through mutation testing (PR #61) of watchkit2 updates (PR #56).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions