CB-13145 : added getFrameworks to unit tests 6/head
authorSteve Gill <stevengill97@gmail.com>
Fri, 18 Aug 2017 00:18:12 +0000 (17:18 -0700)
committerAudrey So <audreyso@apache.org>
Mon, 25 Sep 2017 17:54:22 +0000 (10:54 -0700)
spec/PluginInfo/PluginInfo.spec.js
src/PluginInfo/PluginInfo.js

index e7a7c4f..5fdaf87 100644 (file)
@@ -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');
+    });
 });
index ae003c9..7e9754d 100644 (file)
@@ -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