You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by br...@apache.org on 2019/10/18 13:24:00 UTC
[cordova-node-xcode] branch master updated: Add proper
`filetypeForProducttype` test coverage (#72)
This is an automated email from the ASF dual-hosted git repository.
brodybits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git
The following commit(s) were added to refs/heads/master by this push:
new 4c5c630 Add proper `filetypeForProducttype` test coverage (#72)
4c5c630 is described below
commit 4c5c6306f986fc6ae25703e93bff675fd5b589a0
Author: l3ender <l3...@users.noreply.github.com>
AuthorDate: Fri Oct 18 08:23:53 2019 -0500
Add proper `filetypeForProducttype` test coverage (#72)
* ensure filetypeForProducttype coverage
* cleaner test target descriptions
---
test/addTarget.js | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 130 insertions(+)
diff --git a/test/addTarget.js b/test/addTarget.js
index 4eded2b..452262c 100644
--- a/test/addTarget.js
+++ b/test/addTarget.js
@@ -122,5 +122,135 @@ exports.addTarget = {
test.ok(!phases);
test.done();
+ },
+ 'should have "wrapper.application" filetype for application product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'application');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.application"');
+
+ test.done();
+ },
+ 'should have "wrapper.app-extension" filetype for app_extension product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'app_extension');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.app-extension"');
+
+ test.done();
+ },
+ 'should have "wrapper.plug-in" filetype for bundle product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'bundle');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.plug-in"');
+
+ test.done();
+ },
+ 'should have "compiled.mach-o.dylib" filetype for command_line_tool product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'command_line_tool');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"compiled.mach-o.dylib"');
+
+ test.done();
+ },
+ 'should have "compiled.mach-o.dylib" filetype for dynamic_library product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'dynamic_library');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"compiled.mach-o.dylib"');
+
+ test.done();
+ },
+ 'should have "wrapper.framework" filetype for framework product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'framework');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.framework"');
+
+ test.done();
+ },
+ 'should have "archive.ar" filetype for static_library product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'static_library');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"archive.ar"');
+
+ test.done();
+ },
+ 'should have "wrapper.cfbundle" filetype for unit_test_bundle product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'unit_test_bundle');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.cfbundle"');
+
+ test.done();
+ },
+ 'should have "wrapper.application" filetype for watch_app product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'watch_app');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.application"');
+
+ test.done();
+ },
+ 'should have "wrapper.app-extension" filetype for watch_extension product': function (test) {
+ var target = proj.addTarget(TARGET_NAME, 'watch_extension');
+ test.ok(target);
+ test.ok(target.pbxNativeTarget);
+ test.ok(target.pbxNativeTarget.productReference);
+
+ var productFile = proj.pbxFileReferenceSection()[target.pbxNativeTarget.productReference];
+ test.ok(productFile);
+ test.ok(productFile.explicitFileType);
+ test.equal(productFile.explicitFileType, '"wrapper.app-extension"');
+
+ test.done();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org