You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by au...@apache.org on 2017/09/28 16:19:53 UTC
[2/2] cordova-common git commit: CB-13145 : added getFrameworks to
unit tests
CB-13145 : added getFrameworks to unit tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-common/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-common/commit/623039ff
Tree: http://git-wip-us.apache.org/repos/asf/cordova-common/tree/623039ff
Diff: http://git-wip-us.apache.org/repos/asf/cordova-common/diff/623039ff
Branch: refs/heads/master
Commit: 623039ff6ecb6b522dd5d6da10560cbedded8310
Parents: c38a220
Author: Steve Gill <st...@gmail.com>
Authored: Thu Aug 17 17:18:12 2017 -0700
Committer: Audrey So <au...@apache.org>
Committed: Mon Sep 25 10:54:22 2017 -0700
----------------------------------------------------------------------
spec/PluginInfo/PluginInfo.spec.js | 6 ++++++
src/PluginInfo/PluginInfo.js | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-common/blob/623039ff/spec/PluginInfo/PluginInfo.spec.js
----------------------------------------------------------------------
diff --git a/spec/PluginInfo/PluginInfo.spec.js b/spec/PluginInfo/PluginInfo.spec.js
index e7a7c4f..5fdaf87 100644
--- a/spec/PluginInfo/PluginInfo.spec.js
+++ b/spec/PluginInfo/PluginInfo.spec.js
@@ -64,4 +64,10 @@ describe('PluginInfo', function () {
var result = p.getFrameworks('android', {cli_variables: { FCM_VERSION: '9.0.0' }});
expect(result[2].src).toBe('com.google.firebase:firebase-messaging:9.0.0');
});
+
+ it('Test 004: framework src uses default variable', function () {
+ var p = new PluginInfo(path.join(pluginsDir, 'org.test.src'));
+ var result = p.getFrameworks('android', {});
+ expect(result[2].src).toBe('com.google.firebase:firebase-messaging:11.0.1');
+ });
});
http://git-wip-us.apache.org/repos/asf/cordova-common/blob/623039ff/src/PluginInfo/PluginInfo.js
----------------------------------------------------------------------
diff --git a/src/PluginInfo/PluginInfo.js b/src/PluginInfo/PluginInfo.js
index ae003c9..7e9754d 100644
--- a/src/PluginInfo/PluginInfo.js
+++ b/src/PluginInfo/PluginInfo.js
@@ -317,7 +317,6 @@ function PluginInfo (dirname) {
// get variable defaults from plugin.xml for removal
vars = self.getPreferences(platform);
}
-
var regExp;
// Iterate over plugin variables.
// Replace them in framework src if they exist
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org