Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal filetypeForProducttype function not properly tested #70

Closed
brody4hire opened this issue Oct 17, 2019 · 2 comments · Fixed by #72
Closed

Internal filetypeForProducttype function not properly tested #70

brody4hire opened this issue Oct 17, 2019 · 2 comments · Fixed by #72

Comments

@brody4hire
Copy link

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

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 6466f47..c055e6a 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1705,20 +1705,6 @@ function producttypeForTargettype (targetType) {
 
 function filetypeForProducttype (productType) {
 
-    FILETYPE_BY_PRODUCTTYPE = {
-            'com.apple.product-type.application': '"wrapper.application"',
-            'com.apple.product-type.app-extension': '"wrapper.app-extension"',
-            'com.apple.product-type.bundle': '"wrapper.plug-in"',
-            'com.apple.product-type.tool': '"compiled.mach-o.dylib"',
-            'com.apple.product-type.library.dynamic': '"compiled.mach-o.dylib"',
-            'com.apple.product-type.framework': '"wrapper.framework"',
-            'com.apple.product-type.library.static': '"archive.ar"',
-            'com.apple.product-type.bundle.unit-test': '"wrapper.cfbundle"',
-            'com.apple.product-type.application.watchapp': '"wrapper.application"',
-            'com.apple.product-type.watchkit-extension': '"wrapper.app-extension"'
-        };
-
-    return FILETYPE_BY_PRODUCTTYPE[productType]
 }
 
 pbxProject.prototype.getFirstProject = function() {

I think this test coverage should be added before we can finish adding WatchKit 2 as proposed in PR #56.

Mutation testing is done using Stryker as proposed in PR #61.

/cc @l3ender

@l3ender
Copy link
Contributor

l3ender commented Oct 18, 2019

I can take this up tomorrow (Friday) or this weekend.

@brody4hire
Copy link
Author

I just updated https://chrisbrody.com/node-xcode-mutation/index.html ... nailed it!

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

Successfully merging a pull request may close this issue.

2 participants