cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From audre...@apache.org
Subject [16/18] cordova-lib git commit: CB-12895 : updated integration tests with eslint format and rebased
Date Fri, 28 Jul 2017 18:26:47 GMT
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d19951b3/integration-tests/pkgJson.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index 0781091..e756b97 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -16,15 +16,15 @@
     specific language governing permissions and limitations
     under the License.
 */
-var helpers = require('../spec/helpers'),
-    path = require('path'),
-    shell = require('shelljs'),
-    events = require('cordova-common').events,
-    ConfigParser = require('cordova-common').ConfigParser,
-    cordova = require('../src/cordova/cordova'),
-    TIMEOUT = 30 * 1000,
-    cordova_util = require('../src/cordova/util'),
-    semver = require('semver');
+var helpers = require('../spec/helpers');
+var path = require('path');
+var shell = require('shelljs');
+var events = require('cordova-common').events;
+var ConfigParser = require('cordova-common').ConfigParser;
+var cordova = require('../src/cordova/cordova');
+var TIMEOUT = 30 * 1000;
+var cordova_util = require('../src/cordova/util');
+var semver = require('semver');
 
 function includeFunc (container, value) {
     var returnValue = false;
@@ -39,7 +39,7 @@ describe('plugin end-to-end', function () {
     var pluginId = 'cordova-plugin-device';
     var tmpDir = helpers.tmpDir('plugin_test_pkgjson');
     var project = path.join(tmpDir, 'project');
-    var results;
+    var results; // eslint-disable-line no-unused-vars
     var testRunRoot = process.cwd();
 
     events.on('results', function (res) { results = res; });
@@ -58,7 +58,7 @@ describe('plugin end-to-end', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', project);
     });
 
@@ -78,33 +78,33 @@ describe('plugin end-to-end', function () {
 
         // Add the plugin with --save.
         return cordova.plugin('add', pluginId + '@1.1.2', {'save': true, 'fetch': true})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check that the plugin and spec add was successful to pkg.json.
-            expect(pkgJson).toBeDefined();
-            expect(pkgJson.cordova.plugins).toBeDefined();
-            expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
-            expect(pkgJson.dependencies['cordova-plugin-device']).toEqual('^1.1.2');
-            // Check that the plugin and spec add was successful to config.xml.
-            var cfg2 = new ConfigParser(configXmlPath);
-            configPlugins = cfg2.getPluginIdList();
-            configPlugin = cfg2.getPlugin(configPlugins);
-            expect(configPlugins.length).toEqual(1);
-            expect(configPlugin).toEqual({ name: 'cordova-plugin-device', spec: '^1.1.2', variables: {} });
-        }).then(function () {
-            // And now remove it with --save.
-            return cordova.plugin('rm', pluginId, {'save': true, 'fetch': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Checking that the plugin removed is in not in the pkg.json.
-            expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
-            // Spec should be removed from dependencies.
-            expect(pkgJson.dependencies['cordova-plugin-device']).toBeUndefined();
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check that the plugin and spec add was successful to pkg.json.
+                expect(pkgJson).toBeDefined();
+                expect(pkgJson.cordova.plugins).toBeDefined();
+                expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
+                expect(pkgJson.dependencies['cordova-plugin-device']).toEqual('^1.1.2');
+                // Check that the plugin and spec add was successful to config.xml.
+                var cfg2 = new ConfigParser(configXmlPath);
+                configPlugins = cfg2.getPluginIdList();
+                configPlugin = cfg2.getPlugin(configPlugins);
+                expect(configPlugins.length).toEqual(1);
+                expect(configPlugin).toEqual({ name: 'cordova-plugin-device', spec: '^1.1.2', variables: {} });
+            }).then(function () {
+                // And now remove it with --save.
+                return cordova.plugin('rm', pluginId, {'save': true, 'fetch': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Checking that the plugin removed is in not in the pkg.json.
+                expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
+                // Spec should be removed from dependencies.
+                expect(pkgJson.dependencies['cordova-plugin-device']).toBeUndefined();
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     it('Test#002 : should NOT add a plugin to package.json if --save is not used', function (done) {
@@ -114,20 +114,20 @@ describe('plugin end-to-end', function () {
 
         // Add the geolocation plugin with --save.
         return cordova.plugin('add', 'cordova-plugin-geolocation', {'save': true, 'fetch': true})
-        .then(function () {
-            // Add a second plugin without save.
-            return cordova.plugin('add', pluginId);
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check the plugin add was successful for the first plugin that had --save.
-            expect(pkgJson).not.toBeUndefined();
-            expect(pkgJson.cordova.plugins['cordova-plugin-geolocation']).toBeDefined();
-            // Expect that the second plugin is not added.
-            expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Add a second plugin without save.
+                return cordova.plugin('add', pluginId);
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check the plugin add was successful for the first plugin that had --save.
+                expect(pkgJson).not.toBeUndefined();
+                expect(pkgJson.cordova.plugins['cordova-plugin-geolocation']).toBeDefined();
+                // Expect that the second plugin is not added.
+                expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     it('Test#003 : should NOT remove plugin from package.json if there is no --save', function (done) {
@@ -138,24 +138,24 @@ describe('plugin end-to-end', function () {
 
         // Add the plugin with --save.
         return cordova.plugin('add', pluginId, {'save': true})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check the platform add was successful.
-            expect(pkgJson).not.toBeUndefined();
-            expect(pkgJson.cordova.plugins).toBeDefined();
-            expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
-        }).then(function () {
-            // And now remove it, but without --save.
-            return cordova.plugin('rm', 'cordova-plugin-device');
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // The plugin should still be in package.json.
-            expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check the platform add was successful.
+                expect(pkgJson).not.toBeUndefined();
+                expect(pkgJson.cordova.plugins).toBeDefined();
+                expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
+            }).then(function () {
+                // And now remove it, but without --save.
+                return cordova.plugin('rm', 'cordova-plugin-device');
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // The plugin should still be in package.json.
+                expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     it('Test#004 : should successfully add and remove a plugin with variables and save to package.json', function (done) {
@@ -167,25 +167,25 @@ describe('plugin end-to-end', function () {
 
         // Add the plugin with --save.
         return cordova.plugin('add', pluginId, {'save': true, 'cli_variables': {'someKey': 'someValue'}})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check the plugin add was successful and that variables have been added too.
-            expect(pkgJson).not.toBeUndefined();
-            expect(pkgJson.cordova.plugins).toBeDefined();
-            expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
-            expect(pkgJson.cordova.plugins[pluginId][someKey]).toEqual('someValue');
-        }).then(function () {
-            // And now remove it with --save.
-            return cordova.plugin('rm', pluginId, {'save': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Checking that the plugin and variables were removed successfully.
-            expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check the plugin add was successful and that variables have been added too.
+                expect(pkgJson).not.toBeUndefined();
+                expect(pkgJson.cordova.plugins).toBeDefined();
+                expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
+                expect(pkgJson.cordova.plugins[pluginId][someKey]).toEqual('someValue');
+            }).then(function () {
+                // And now remove it with --save.
+                return cordova.plugin('rm', pluginId, {'save': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Checking that the plugin and variables were removed successfully.
+                expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     // CB-12170 : Test is commented out because not promisified correctly in cordova-create script
@@ -198,30 +198,30 @@ describe('plugin end-to-end', function () {
 
         // Add the plugin with --save.
         return cordova.plugin('add', [pluginId, 'cordova-plugin-device-motion'], {'save': true, 'fetch': true})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check that the plugin add was successful.
-            expect(pkgJson).not.toBeUndefined();
-            expect(pkgJson.cordova.plugins).not.toBeUndefined();
-            expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
-            expect(pkgJson.cordova.plugins['cordova-plugin-device-motion']).toBeDefined();
-            expect(pkgJson.dependencies[pluginId]).toBeDefined();
-            expect(pkgJson.dependencies['cordova-plugin-device-motion']).toBeDefined();
-        }).then(function () {
-            // And now remove it with --save.
-            return cordova.plugin('rm', [pluginId, 'cordova-plugin-device-motion'], {'save': true, 'fetch': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Checking that the plugin removed is in not in the platforms.
-            expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
-            expect(pkgJson.cordova.plugins['cordova-plugin-device-motion']).toBeUndefined();
-            expect(pkgJson.dependencies[pluginId]).toBeUndefined();
-            expect(pkgJson.dependencies['cordova-plugin-device-motion']).toBeUndefined();
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check that the plugin add was successful.
+                expect(pkgJson).not.toBeUndefined();
+                expect(pkgJson.cordova.plugins).not.toBeUndefined();
+                expect(pkgJson.cordova.plugins[pluginId]).toBeDefined();
+                expect(pkgJson.cordova.plugins['cordova-plugin-device-motion']).toBeDefined();
+                expect(pkgJson.dependencies[pluginId]).toBeDefined();
+                expect(pkgJson.dependencies['cordova-plugin-device-motion']).toBeDefined();
+            }).then(function () {
+                // And now remove it with --save.
+                return cordova.plugin('rm', [pluginId, 'cordova-plugin-device-motion'], {'save': true, 'fetch': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Checking that the plugin removed is in not in the platforms.
+                expect(pkgJson.cordova.plugins[pluginId]).toBeUndefined();
+                expect(pkgJson.cordova.plugins['cordova-plugin-device-motion']).toBeUndefined();
+                expect(pkgJson.dependencies[pluginId]).toBeUndefined();
+                expect(pkgJson.dependencies['cordova-plugin-device-motion']).toBeUndefined();
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
     // Test #023 : if pkg.json and config.xml have no platforms/plugins/spec.
     // and --save --fetch is called, use the pinned version or plugin pkg.json version.
@@ -236,8 +236,8 @@ describe('plugin end-to-end', function () {
         var pkgJson = cordova_util.requireNoCache(pkgJsonPath);
         var cfg = new ConfigParser(configXmlPath);
         var engines = cfg.getEngines();
-        var engNames;
-        var engSpec;
+        var engNames; // eslint-disable-line no-unused-vars
+        var engSpec; // eslint-disable-line no-unused-vars
         var configPlugins = cfg.getPluginIdList();
         var configPlugin = cfg.getPlugin(configPlugins);
         var pluginPkgJsonDir = path.join(cwd, 'plugins/cordova-plugin-geolocation/package.json');
@@ -250,48 +250,48 @@ describe('plugin end-to-end', function () {
         expect(engines.length).toEqual(0);
         // Add ios without version.
         return cordova.platform('add', ['ios'], {'save': true, 'fetch': true})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Pkg.json has ios.
-            expect(pkgJson.cordova.platforms).toEqual([iosPlatform]);
-            // Config.xml and ios/cordova/version check.
-            var cfg2 = new ConfigParser(configXmlPath);
-            engines = cfg2.getEngines();
-            // ios platform has been added to config.xml.
-            expect(engines.length).toEqual(1);
-            // Config.xml has ios platform.
-            engNames = engines.map(function (elem) {
-                return elem.name;
-            });
-            expect(engNames).toEqual([ 'ios' ]);
-            // delete previous caches of iosVersion;
-            iosVersion = cordova_util.requireNoCache(iosDirectory);
-            engSpec = engines.map(function (elem) {
-                // Check that config and ios/cordova/version versions "satify" each other.
-                expect(semver.satisfies(iosVersion.version, elem.spec)).toEqual(true);
-            });
-        }).then(function () {
-            // Add geolocation plugin with --save --fetch.
-            return cordova.plugin('add', 'cordova-plugin-geolocation', {'save': true, 'fetch': true});
-        }).then(function () {
-            var iosJson = cordova_util.requireNoCache(iosJsonPath);
-            expect(iosJson.installed_plugins['cordova-plugin-geolocation']).toBeDefined();
-            var cfg3 = new ConfigParser(configXmlPath);
-            // Check config.xml for plugins and spec.
-            configPlugins = cfg3.getPluginIdList();
-            configPlugin = cfg3.getPlugin(configPlugins);
-            // Delete previous caches of pluginPkgJson.
-            pluginPkgJsonVersion = cordova_util.requireNoCache(pluginPkgJsonDir);
-            // Check that version in plugin pkg.json and config version "satisfy" each other.
-            expect(semver.satisfies(pluginPkgJsonVersion.version, configPlugin.spec)).toEqual(true);
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check that pkg.json and plugin pkg.json versions "satisfy".
-            expect(semver.satisfies(pluginPkgJsonVersion.version, pkgJson.dependencies['cordova-ios']));
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Pkg.json has ios.
+                expect(pkgJson.cordova.platforms).toEqual([iosPlatform]);
+                // Config.xml and ios/cordova/version check.
+                var cfg2 = new ConfigParser(configXmlPath);
+                engines = cfg2.getEngines();
+                // ios platform has been added to config.xml.
+                expect(engines.length).toEqual(1);
+                // Config.xml has ios platform.
+                engNames = engines.map(function (elem) {
+                    return elem.name;
+                });
+                expect(engNames).toEqual([ 'ios' ]);
+                // delete previous caches of iosVersion;
+                iosVersion = cordova_util.requireNoCache(iosDirectory);
+                engSpec = engines.map(function (elem) {
+                    // Check that config and ios/cordova/version versions "satify" each other.
+                    expect(semver.satisfies(iosVersion.version, elem.spec)).toEqual(true);
+                });
+            }).then(function () {
+                // Add geolocation plugin with --save --fetch.
+                return cordova.plugin('add', 'cordova-plugin-geolocation', {'save': true, 'fetch': true});
+            }).then(function () {
+                var iosJson = cordova_util.requireNoCache(iosJsonPath);
+                expect(iosJson.installed_plugins['cordova-plugin-geolocation']).toBeDefined();
+                var cfg3 = new ConfigParser(configXmlPath);
+                // Check config.xml for plugins and spec.
+                configPlugins = cfg3.getPluginIdList();
+                configPlugin = cfg3.getPlugin(configPlugins);
+                // Delete previous caches of pluginPkgJson.
+                pluginPkgJsonVersion = cordova_util.requireNoCache(pluginPkgJsonDir);
+                // Check that version in plugin pkg.json and config version "satisfy" each other.
+                expect(semver.satisfies(pluginPkgJsonVersion.version, configPlugin.spec)).toEqual(true);
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check that pkg.json and plugin pkg.json versions "satisfy".
+                expect(semver.satisfies(pluginPkgJsonVersion.version, pkgJson.dependencies['cordova-ios']));
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     // Cordova prepare needs extra wait time to complete.
     }, 60000);
 
@@ -306,60 +306,60 @@ describe('plugin end-to-end', function () {
         var configXmlPath = path.join(cwd, 'config.xml');
         var cfg = new ConfigParser(configXmlPath);
         var engines = cfg.getEngines();
-        var engNames;
-        var engSpec;
+        var engNames; // eslint-disable-line no-unused-vars
+        var engSpec; // eslint-disable-line no-unused-vars
 
         cordova_util.requireNoCache(pkgJsonPath);
         // Run cordova platform add local path --save --fetch.
         return cordova.platform('add', platformPath, {'save': true, 'fetch': true})
-        .then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Pkg.json has browser.
-            expect(pkgJson.cordova.platforms).toEqual(['browser']);
-
-            // Check that the value here exists
-            expect(pkgJson.dependencies['cordova-browser']).toBeDefined();
-
-            var cfg2 = new ConfigParser(configXmlPath);
-            engines = cfg2.getEngines();
-            // browser platform and spec have been added to config.xml.
-            engNames = engines.map(function (elem) {
-                return elem.name;
-            });
-            engSpec = engines.map(function (elem) {
-                if (elem.name === 'browser') {
-                    var result = includeFunc(elem.spec, platformPath);
-                    expect(result).toEqual(true);
-                }
-            });
-        }).then(function () {
-            // Run cordova plugin add local path --save --fetch.
-            return cordova.plugin('add', pluginPath, {'save': true, 'fetch': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Pkg.json has geolocation plugin.
-            expect(pkgJson.cordova.plugins['cordova-lib-test-plugin']).toBeDefined();
-
-            // Check that the value here EXISTS
-            expect(pkgJson.dependencies['cordova-lib-test-plugin']).toBeDefined();
-
-            var cfg3 = new ConfigParser(configXmlPath);
-            engines = cfg3.getEngines();
-            // Check that browser and spec have been added to config.xml
-            engNames = engines.map(function (elem) {
-                return elem.name;
-            });
-            engSpec = engines.map(function (elem) {
-                if (elem.name === 'browser') {
-                    var result = includeFunc(elem.spec, platformPath);
-                    expect(result).toEqual(true);
-                }
-            });
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Pkg.json has browser.
+                expect(pkgJson.cordova.platforms).toEqual(['browser']);
+
+                // Check that the value here exists
+                expect(pkgJson.dependencies['cordova-browser']).toBeDefined();
+
+                var cfg2 = new ConfigParser(configXmlPath);
+                engines = cfg2.getEngines();
+                // browser platform and spec have been added to config.xml.
+                engNames = engines.map(function (elem) {
+                    return elem.name;
+                });
+                engSpec = engines.map(function (elem) {
+                    if (elem.name === 'browser') {
+                        var result = includeFunc(elem.spec, platformPath);
+                        expect(result).toEqual(true);
+                    }
+                });
+            }).then(function () {
+                // Run cordova plugin add local path --save --fetch.
+                return cordova.plugin('add', pluginPath, {'save': true, 'fetch': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Pkg.json has geolocation plugin.
+                expect(pkgJson.cordova.plugins['cordova-lib-test-plugin']).toBeDefined();
+
+                // Check that the value here EXISTS
+                expect(pkgJson.dependencies['cordova-lib-test-plugin']).toBeDefined();
+
+                var cfg3 = new ConfigParser(configXmlPath);
+                engines = cfg3.getEngines();
+                // Check that browser and spec have been added to config.xml
+                engNames = engines.map(function (elem) {
+                    return elem.name;
+                });
+                engSpec = engines.map(function (elem) {
+                    if (elem.name === 'browser') {
+                        var result = includeFunc(elem.spec, platformPath);
+                        expect(result).toEqual(true);
+                    }
+                });
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, 60000);
 });
 
@@ -383,7 +383,7 @@ describe('platform end-to-end with --save', function () {
     afterEach(function () {
         // Delete any previous caches of require(package.json).
         cordova_util.requireNoCache(path.join(process.cwd(), 'package.json'));
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -418,17 +418,17 @@ describe('platform end-to-end with --save', function () {
             expect(pkgJson.cordova.platforms).not.toBeUndefined();
             expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toEqual(0);
         }).then(fullPlatformList) // Platform should still be in platform ls.
-        .then(function () {
-            // And now remove it with --save.
-            return cordova.platform('rm', [helpers.testPlatform], {'save': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Checking that the platform removed is in not in the platforms key.
-            expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toEqual(-1);
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // And now remove it with --save.
+                return cordova.platform('rm', [helpers.testPlatform], {'save': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Checking that the platform removed is in not in the platforms key.
+                expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toEqual(-1);
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     it('Test#007 : should not remove platforms from package.json when removing without --save', function (done) {
@@ -445,18 +445,18 @@ describe('platform end-to-end with --save', function () {
             expect(pkgJson.cordova.platforms).not.toBeUndefined();
             expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toBeGreaterThan(-1);
         }).then(fullPlatformList) // Platform should still be in platform ls.
-        .then(function () {
-            // And now remove it without --save.
-            return cordova.platform('rm', [helpers.testPlatform]);
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Check that the platform removed without --save is still in platforms key.
-            expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toBeGreaterThan(-1);
-        }).then(emptyPlatformList)
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // And now remove it without --save.
+                return cordova.platform('rm', [helpers.testPlatform]);
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Check that the platform removed without --save is still in platforms key.
+                expect(pkgJson.cordova.platforms.indexOf(helpers.testPlatform)).toBeGreaterThan(-1);
+            }).then(emptyPlatformList)
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 
     it('Test#008 : should not add platform to package.json when adding without --save', function (done) {
@@ -468,16 +468,16 @@ describe('platform end-to-end with --save', function () {
         expect(pkgJson.cordova).toBeUndefined();
         // Add platform without --save.
         cordova.platform('add', [helpers.testPlatform])
-        .then(function () {
-            // Check the platform add was successful, reload, skipping cache.
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // PkgJson.cordova should not be defined and helpers.testPlatform should NOT have been added.
-            expect(pkgJson.cordova).toBeUndefined();
-        }).then(fullPlatformList)
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                // Check the platform add was successful, reload, skipping cache.
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // PkgJson.cordova should not be defined and helpers.testPlatform should NOT have been added.
+                expect(pkgJson.cordova).toBeUndefined();
+            }).then(fullPlatformList)
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, TIMEOUT);
 
     it('Test#009 : should only add the platform to package.json with --save', function (done) {
@@ -488,22 +488,22 @@ describe('platform end-to-end with --save', function () {
 
         // Add a platform without --save.
         cordova.platform('add', platformNotToAdd)
-        .then(function () {
-            // And now add another platform with --save.
-            return cordova.platform('add', [helpers.testPlatform], {'save': true});
-        }).then(function () {
-            // Check the platform add was successful, reload, skipping cache.
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Beware empty/missing cordova object.
-            var pkgJsonCordova = pkgJson.cordova || {platforms: []};
-            // Check that only the platform added with --save was added to package.json.
-            expect(pkgJsonCordova.platforms.indexOf(helpers.testPlatform)).toBeGreaterThan(-1);
-            expect(pkgJsonCordova.platforms.indexOf(platformNotToAdd)).toEqual(-1);
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                // And now add another platform with --save.
+                return cordova.platform('add', [helpers.testPlatform], {'save': true});
+            }).then(function () {
+                // Check the platform add was successful, reload, skipping cache.
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Beware empty/missing cordova object.
+                var pkgJsonCordova = pkgJson.cordova || {platforms: []};
+                // Check that only the platform added with --save was added to package.json.
+                expect(pkgJsonCordova.platforms.indexOf(helpers.testPlatform)).toBeGreaterThan(-1);
+                expect(pkgJsonCordova.platforms.indexOf(platformNotToAdd)).toEqual(-1);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, TIMEOUT);
 
     it('Test#010 : two platforms are added and removed correctly with --save --fetch', function (done) {
@@ -552,31 +552,31 @@ describe('platform end-to-end with --save', function () {
             expect(engines).toEqual([ { name: 'android', spec: '~6.1.0' }, { name: 'browser', spec: '~4.1.0' } ]);
 
         }).then(fullPlatformList) // Platform should still be in platform ls.
-        .then(function () {
-            // And now remove it with --save.
-            return cordova.platform('rm', ['android', 'browser'], {'save': true, 'fetch': true});
-        }).then(function () {
-            // Delete any previous caches of require(package.json).
-            pkgJson = cordova_util.requireNoCache(pkgJsonPath);
-            // Checking that the platform removed is in not in the platforms key.
-            expect(pkgJson.cordova.platforms.indexOf('android')).toEqual(-1);
-            expect(pkgJson.cordova.platforms.indexOf('browser')).toEqual(-1);
-            // Dependencies are removed.
-            expect(pkgJson.dependencies['cordova-android']).toBeUndefined();
-            expect(pkgJson.dependencies['cordova-browser']).toBeUndefined();
-            // Platforms are removed from config.xml.
-            var cfg4 = new ConfigParser(configXmlPath);
-            engines = cfg4.getEngines();
-            engNames = engines.map(function (elem) {
-                return elem.name;
-            });
-            configEngArray = engNames.slice();
-            // Platforms are removed from config.xml.
-            expect(configEngArray.length === 0);
-        }).then(emptyPlatformList) // platform ls should be empty too.
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // And now remove it with --save.
+                return cordova.platform('rm', ['android', 'browser'], {'save': true, 'fetch': true});
+            }).then(function () {
+                // Delete any previous caches of require(package.json).
+                pkgJson = cordova_util.requireNoCache(pkgJsonPath);
+                // Checking that the platform removed is in not in the platforms key.
+                expect(pkgJson.cordova.platforms.indexOf('android')).toEqual(-1);
+                expect(pkgJson.cordova.platforms.indexOf('browser')).toEqual(-1);
+                // Dependencies are removed.
+                expect(pkgJson.dependencies['cordova-android']).toBeUndefined();
+                expect(pkgJson.dependencies['cordova-browser']).toBeUndefined();
+                // Platforms are removed from config.xml.
+                var cfg4 = new ConfigParser(configXmlPath);
+                engines = cfg4.getEngines();
+                engNames = engines.map(function (elem) {
+                    return elem.name;
+                });
+                configEngArray = engNames.slice();
+                // Platforms are removed from config.xml.
+                expect(configEngArray.length === 0);
+            }).then(emptyPlatformList) // platform ls should be empty too.
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, TIMEOUT);
 });
 
@@ -600,7 +600,7 @@ describe('During add, if pkg.json has a platform/plugin spec, use that one.', fu
     afterEach(function () {
         // Delete any previous caches of require(package.json).
         cordova_util.requireNoCache(path.join(process.cwd(), 'package.json'));
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -628,7 +628,7 @@ describe('During add, if pkg.json has a platform/plugin spec, use that one.', fu
         var cfg = new ConfigParser(configXmlPath);
         var engines = cfg.getEngines();
         var engNames;
-        var engSpec;
+        var engSpec; // eslint-disable-line no-unused-vars
         var platformsJson;
         var configPlugins = cfg.getPluginIdList();
         var pluginPkgJsonDir = path.join(cwd, 'plugins/cordova-plugin-splashscreen/package.json');
@@ -709,7 +709,7 @@ describe('During add, if config.xml has a platform/plugin spec and pkg.json does
 
     afterEach(function () {
         // Delete any previous caches of require(package.json).
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -736,7 +736,7 @@ describe('During add, if config.xml has a platform/plugin spec and pkg.json does
         var pkgJson;
         var engines = cfg.getEngines();
         var engNames;
-        var engSpec;
+        var engSpec; // eslint-disable-line no-unused-vars
         var configPlugins = cfg.getPluginIdList();
         var configPlugin = cfg.getPlugin(configPlugins);
         var pluginPkgJsonDir = path.join(cwd, 'plugins/cordova-plugin-splashscreen/package.json');
@@ -808,7 +808,7 @@ describe('During add, if add specifies a platform spec, use that one regardless
     afterEach(function () {
         // Delete any previous caches of require(package.json).
         cordova_util.requireNoCache(path.join(process.cwd(), 'package.json'));
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -896,7 +896,7 @@ describe('During add, if add specifies a platform spec, use that one regardless
 describe('local path is added to config.xml without pkg.json', function () {
     var tmpDir = helpers.tmpDir('platform_test_pkgjson');
     var project = path.join(tmpDir, 'project');
-    var results;
+    var results; // eslint-disable-line no-unused-vars
     var testRunRoot = process.cwd();
 
     beforeEach(function () {
@@ -911,7 +911,7 @@ describe('local path is added to config.xml without pkg.json', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -921,28 +921,28 @@ describe('local path is added to config.xml without pkg.json', function () {
         var configXmlPath = path.join(cwd, 'config.xml');
         var cfg = new ConfigParser(configXmlPath);
         var engines = cfg.getEngines();
-        var engNames;
-        var engSpec;
+        var engNames; // eslint-disable-line no-unused-vars
+        var engSpec; // eslint-disable-line no-unused-vars
         var platformPath = path.join(testRunRoot, 'spec', 'cordova/fixtures/platforms/cordova-browser');
 
         // Run cordova platform add local path --save --fetch.
         return cordova.platform('add', platformPath, {'save': true, 'fetch': true})
-        .then(function () {
-            var cfg2 = new ConfigParser(configXmlPath);
-            engines = cfg2.getEngines();
-            // ios platform and spec have been added to config.xml.
-            engNames = engines.map(function (elem) {
-                return elem.name;
-            });
-            engSpec = engines.map(function (elem) {
-                if (elem.name === 'browser') {
-                    var result = includeFunc(elem.spec, platformPath);
-                    expect(result).toEqual(true);
-                }
-            });
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                var cfg2 = new ConfigParser(configXmlPath);
+                engines = cfg2.getEngines();
+                // ios platform and spec have been added to config.xml.
+                engNames = engines.map(function (elem) {
+                    return elem.name;
+                });
+                engSpec = engines.map(function (elem) {
+                    if (elem.name === 'browser') {
+                        var result = includeFunc(elem.spec, platformPath);
+                        expect(result).toEqual(true);
+                    }
+                });
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, 60000);
 
     // Test#027: has NO pkg.json. Checks if local path is added to config.xml and has no errors.
@@ -955,18 +955,18 @@ describe('local path is added to config.xml without pkg.json', function () {
         var configPlugin = cfg.getPlugin(configPlugins);
         // Run platform add with local path.
         return cordova.plugin('add', pluginPath, {'save': true, 'fetch': true})
-        .then(function () {
-            var cfg2 = new ConfigParser(configXmlPath);
-            // Check config.xml for plugins and spec.
-            configPlugins = cfg2.getPluginIdList();
-            configPlugin = cfg2.getPlugin(configPlugins[1]);
-            // Plugin is added.
-            expect(configPlugin.name).toEqual('cordova-lib-test-plugin');
-            // Spec for geolocation plugin is added.
-            var result = includeFunc(configPlugin.spec, pluginPath);
-            expect(result).toEqual(true);
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                var cfg2 = new ConfigParser(configXmlPath);
+                // Check config.xml for plugins and spec.
+                configPlugins = cfg2.getPluginIdList();
+                configPlugin = cfg2.getPlugin(configPlugins[1]);
+                // Plugin is added.
+                expect(configPlugin.name).toEqual('cordova-lib-test-plugin');
+                // Spec for geolocation plugin is added.
+                var result = includeFunc(configPlugin.spec, pluginPath);
+                expect(result).toEqual(true);
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     }, 60000);
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d19951b3/integration-tests/platform.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/platform.spec.js b/integration-tests/platform.spec.js
index dd6d2b7..82f6711 100644
--- a/integration-tests/platform.spec.js
+++ b/integration-tests/platform.spec.js
@@ -15,22 +15,20 @@
     under the License.
 */
 
-var helpers = require('../spec/helpers'),
-    path = require('path'),
-    fs = require('fs'),
-    shell = require('shelljs'),
-    superspawn = require('cordova-common').superspawn,
-    config = require('../src/cordova/config'),
-    Q = require('q'),
-    events = require('cordova-common').events,
-    cordova = require('../src/cordova/cordova'),
-    rewire = require('rewire'),
-    prepare = require('../src/cordova/prepare'),
-    plugman = require('../src/plugman/plugman'),
-    platform = rewire('../src/cordova/platform'),
-    addHelper = rewire('../src/cordova/platform/addHelper');
-
-var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker';
+var helpers = require('../spec/helpers');
+var path = require('path');
+var fs = require('fs');
+var shell = require('shelljs');
+var superspawn = require('cordova-common').superspawn;
+var config = require('../src/cordova/config');
+var Q = require('q');
+var events = require('cordova-common').events;
+var cordova = require('../src/cordova/cordova');
+var rewire = require('rewire');
+var prepare = require('../src/cordova/prepare'); // eslint-disable-line no-unused-vars
+var plugman = require('../src/plugman/plugman');
+var platform = rewire('../src/cordova/platform');
+var addHelper = rewire('../src/cordova/platform/addHelper');
 var fixturesDir = path.join(__dirname, '..', 'spec', 'cordova', 'fixtures');
 var pluginsDir = path.join(fixturesDir, 'plugins');
 
@@ -74,7 +72,7 @@ describe('platform end-to-end', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
@@ -112,60 +110,60 @@ describe('platform end-to-end', function () {
             expect(path.join(project, 'platforms', helpers.testPlatform)).toExist();
             expect(path.join(project, 'platforms', helpers.testPlatform, 'cordova')).toExist();
         }).then(fullPlatformList) // Check for it in platform ls.
-        .then(function () {
-            // Try to update the platform.
-            return cordova.platform('update', [helpers.testPlatform]);
-        }).then(function () {
-            // Our fake update script in the exec mock above creates this dummy file.
-            expect(path.join(project, 'platforms', helpers.testPlatform, 'updated')).toExist();
-        }).then(fullPlatformList) // Platform should still be in platform ls.
-        .then(function () {
-            // And now remove it.
-            return cordova.platform('rm', [helpers.testPlatform]);
-        }).then(function () {
-            // It should be gone.
-            expect(path.join(project, 'platforms', helpers.testPlatform)).not.toExist();
-        }).then(emptyPlatformList) // platform ls should be empty too.
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        }).fin(done);
+            .then(function () {
+                // Try to update the platform.
+                return cordova.platform('update', [helpers.testPlatform]);
+            }).then(function () {
+                // Our fake update script in the exec mock above creates this dummy file.
+                expect(path.join(project, 'platforms', helpers.testPlatform, 'updated')).toExist();
+            }).then(fullPlatformList) // Platform should still be in platform ls.
+            .then(function () {
+                // And now remove it.
+                return cordova.platform('rm', [helpers.testPlatform]);
+            }).then(function () {
+                // It should be gone.
+                expect(path.join(project, 'platforms', helpers.testPlatform)).not.toExist();
+            }).then(emptyPlatformList) // platform ls should be empty too.
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            }).fin(done);
     });
 
     it('Test 002 : should install plugins correctly while adding platform', function (done) {
 
         cordova.plugin('add', path.join(pluginsDir, 'test'))
-        .then(function () {
-            return cordova.platform('add', [helpers.testPlatform]);
-        })
-        .then(function () {
-            // Check the platform add was successful.
-            expect(path.join(project, 'platforms', helpers.testPlatform)).toExist();
-            // Check that plugin files exists in www dir
-            expect(path.join(project, 'platforms', helpers.testPlatform, 'assets/www/test.js')).toExist();
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                return cordova.platform('add', [helpers.testPlatform]);
+            })
+            .then(function () {
+                // Check the platform add was successful.
+                expect(path.join(project, 'platforms', helpers.testPlatform)).toExist();
+                // Check that plugin files exists in www dir
+                expect(path.join(project, 'platforms', helpers.testPlatform, 'assets/www/test.js')).toExist();
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 60000);
 
     xit('Test 003 : should call prepare after plugins were installed into platform', function (done) {
         var order = '';
-        var fail = jasmine.createSpy(fail);
+        var fail = jasmine.createSpy(fail); // eslint-disable-line no-use-before-define
         spyOn(plugman, 'install').and.callFake(function () { order += 'I'; });
         // below line won't work since prepare is inline require in addHelper, not global
-        var x = addHelper.__set__('prepare', function () { order += 'P'; });
+        var x = addHelper.__set__('prepare', function () { order += 'P'; }); // eslint-disable-line no-unused-vars
         // spyOn(prepare).and.callFake(function() { console.log('prepare'); order += 'P'; });
         cordova.plugin('add', path.join(pluginsDir, 'test'))
-        .then(function () {
-            return platform('add', [helpers.testPlatform]);
-        })
-        .fail(fail)
-        .fin(function () {
-            expect(order).toBe('IP'); // Install first, then prepare
-            expect(fail).not.toHaveBeenCalled();
-            done();
-        });
+            .then(function () {
+                return platform('add', [helpers.testPlatform]);
+            })
+            .fail(fail)
+            .fin(function () {
+                expect(order).toBe('IP'); // Install first, then prepare
+                expect(fail).not.toHaveBeenCalled();
+                done();
+            });
     });
 });
 
@@ -180,39 +178,39 @@ describe('platform add plugin rm end-to-end', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
     it('Test 006 : should remove dependency when removing parent plugin', function (done) {
 
         cordova.create('hello')
-        .then(function () {
-            process.chdir(project);
-            return cordova.platform('add', 'browser@latest');
-        })
-        .then(function () {
-            return cordova.plugin('add', 'cordova-plugin-media');
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
-            return cordova.platform('add', 'android');
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
-            return cordova.plugin('rm', 'cordova-plugin-media');
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).not.toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).not.toExist();
-        })
-        .fail(function (err) {
-            console.error(err);
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                process.chdir(project);
+                return cordova.platform('add', 'browser@latest');
+            })
+            .then(function () {
+                return cordova.plugin('add', 'cordova-plugin-media');
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+                return cordova.platform('add', 'android');
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+                return cordova.plugin('rm', 'cordova-plugin-media');
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).not.toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).not.toExist();
+            })
+            .fail(function (err) {
+                console.error(err);
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 100000);
 });
 
@@ -228,43 +226,43 @@ describe('platform add and remove --fetch', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
     it('Test 007 : should add and remove platform from node_modules directory', function (done) {
 
         cordova.create('helloFetch')
-        .then(function () {
-            process.chdir(project);
-            return cordova.platform('add', 'browser', {'fetch': true});
-        })
-        .then(function () {
-            expect(path.join(nodeModulesDir, 'cordova-browser')).toExist();
-            expect(path.join(platformsDir, 'browser')).toExist();
-            return cordova.platform('add', 'android', {'fetch': true});
-        })
-        .then(function () {
-            expect(path.join(nodeModulesDir, 'cordova-browser')).toExist();
-            expect(path.join(platformsDir, 'android')).toExist();
-            // Tests finish before this command finishes resolving
-            // return cordova.platform('rm', 'ios', {'fetch':true});
-        })
-        .then(function () {
-            // expect(path.join(nodeModulesDir, 'cordova-ios')).not.toExist();
-            // expect(path.join(platformsDir, 'ios')).not.toExist();
-            // Tests finish before this command finishes resolving
-            // return cordova.platform('rm', 'android', {'fetch':true});
-        })
-        .then(function () {
-            // expect(path.join(nodeModulesDir, 'cordova-android')).not.toExist();
-            // expect(path.join(platformsDir, 'android')).not.toExist();
-        })
-        .fail(function (err) {
-            console.error(err);
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                process.chdir(project);
+                return cordova.platform('add', 'browser', {'fetch': true});
+            })
+            .then(function () {
+                expect(path.join(nodeModulesDir, 'cordova-browser')).toExist();
+                expect(path.join(platformsDir, 'browser')).toExist();
+                return cordova.platform('add', 'android', {'fetch': true});
+            })
+            .then(function () {
+                expect(path.join(nodeModulesDir, 'cordova-browser')).toExist();
+                expect(path.join(platformsDir, 'android')).toExist();
+                // Tests finish before this command finishes resolving
+                // return cordova.platform('rm', 'ios', {'fetch':true});
+            })
+            .then(function () {
+                // expect(path.join(nodeModulesDir, 'cordova-ios')).not.toExist();
+                // expect(path.join(platformsDir, 'ios')).not.toExist();
+                // Tests finish before this command finishes resolving
+                // return cordova.platform('rm', 'android', {'fetch':true});
+            })
+            .then(function () {
+                // expect(path.join(nodeModulesDir, 'cordova-android')).not.toExist();
+                // expect(path.join(platformsDir, 'android')).not.toExist();
+            })
+            .fail(function (err) {
+                console.error(err);
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 100000);
 });
 
@@ -279,47 +277,47 @@ describe('plugin add and rm end-to-end --fetch', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
     it('Test 008 : should remove dependency when removing parent plugin', function (done) {
 
         cordova.create('hello3')
-        .then(function () {
-            process.chdir(project);
-            return cordova.platform('add', 'browser', {'fetch': true});
-        })
-        .then(function () {
-            return cordova.plugin('add', 'cordova-plugin-media', {'fetch': true});
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-compat')).toExist();
-            expect(path.join(project, 'node_modules', 'cordova-plugin-media')).toExist();
-            expect(path.join(project, 'node_modules', 'cordova-plugin-file')).toExist();
-            expect(path.join(project, 'node_modules', 'cordova-plugin-compat')).toExist();
-            return cordova.platform('add', 'android', {'fetch': true});
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
-            return cordova.plugin('rm', 'cordova-plugin-media', {'fetch': true});
-        })
-        .then(function () {
-            expect(path.join(pluginsDir, 'cordova-plugin-media')).not.toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-file')).not.toExist();
-            expect(path.join(pluginsDir, 'cordova-plugin-compat')).not.toExist();
-            // These don't work yet due to the tests finishing before the promise resolves.
-            // expect(path.join(project, 'node_modules', 'cordova-plugin-media')).not.toExist();
-            // expect(path.join(project, 'node_modules', 'cordova-plugin-file')).not.toExist();
-            // expect(path.join(project, 'node_modules', 'cordova-plugin-compat')).not.toExist();
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                process.chdir(project);
+                return cordova.platform('add', 'browser', {'fetch': true});
+            })
+            .then(function () {
+                return cordova.plugin('add', 'cordova-plugin-media', {'fetch': true});
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-compat')).toExist();
+                expect(path.join(project, 'node_modules', 'cordova-plugin-media')).toExist();
+                expect(path.join(project, 'node_modules', 'cordova-plugin-file')).toExist();
+                expect(path.join(project, 'node_modules', 'cordova-plugin-compat')).toExist();
+                return cordova.platform('add', 'android', {'fetch': true});
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
+                return cordova.plugin('rm', 'cordova-plugin-media', {'fetch': true});
+            })
+            .then(function () {
+                expect(path.join(pluginsDir, 'cordova-plugin-media')).not.toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-file')).not.toExist();
+                expect(path.join(pluginsDir, 'cordova-plugin-compat')).not.toExist();
+                // These don't work yet due to the tests finishing before the promise resolves.
+                // expect(path.join(project, 'node_modules', 'cordova-plugin-media')).not.toExist();
+                // expect(path.join(project, 'node_modules', 'cordova-plugin-file')).not.toExist();
+                // expect(path.join(project, 'node_modules', 'cordova-plugin-compat')).not.toExist();
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 60000);
 });
 
@@ -335,34 +333,34 @@ describe('non-core platform add and rm end-to-end --fetch', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
     it('Test 009 : should add and remove 3rd party platforms', function (done) {
         var installed;
         cordova.create('hello')
-        .then(function () {
-            process.chdir(project);
-            // add cordova-android instead of android
-            return cordova.platform('add', 'cordova-android', {'fetch': true});
-        }).then(function () {
-            // 3rd party platform from npm
-            return cordova.platform('add', 'cordova-platform-test', {'fetch': true});
-        }).then(function () {
-            expect(path.join(project, 'platforms', 'android')).toExist();
-            expect(path.join(project, 'platforms', 'cordova-platform-test')).toExist();
-            return cordova.platform('ls');
-        })
-        .then(function () {
-            // use regex to grab installed platforms
-            installed = results.match(/Installed platforms:\n {2}(.*)\n {2}(.*)/);
-            expect(installed).toBeDefined();
-            expect(installed[1].indexOf('android')).toBeGreaterThan(-1);
-            expect(installed[2].indexOf('cordova-platform-test')).toBeGreaterThan(-1);
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                process.chdir(project);
+                // add cordova-android instead of android
+                return cordova.platform('add', 'cordova-android', {'fetch': true});
+            }).then(function () {
+                // 3rd party platform from npm
+                return cordova.platform('add', 'cordova-platform-test', {'fetch': true});
+            }).then(function () {
+                expect(path.join(project, 'platforms', 'android')).toExist();
+                expect(path.join(project, 'platforms', 'cordova-platform-test')).toExist();
+                return cordova.platform('ls');
+            })
+            .then(function () {
+                // use regex to grab installed platforms
+                installed = results.match(/Installed platforms:\n {2}(.*)\n {2}(.*)/);
+                expect(installed).toBeDefined();
+                expect(installed[1].indexOf('android')).toBeGreaterThan(-1);
+                expect(installed[2].indexOf('cordova-platform-test')).toBeGreaterThan(-1);
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 90000);
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d19951b3/integration-tests/plugin.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/plugin.spec.js b/integration-tests/plugin.spec.js
index 499ab6c..a19f8c7 100644
--- a/integration-tests/plugin.spec.js
+++ b/integration-tests/plugin.spec.js
@@ -17,16 +17,16 @@
     under the License.
 */
 
-var helpers = require('../spec/helpers'),
-    path = require('path'),
-    Q = require('q'),
-    shell = require('shelljs'),
-    events = require('cordova-common').events,
-    cordova = require('../src/cordova/cordova'),
-    platforms = require('../src/platforms/platforms'),
-    plugman = require('../src/plugman/plugman'),
-    install = require('../src/plugman/install'),
-    registry = require('../src/plugman/registry/registry');
+var helpers = require('../spec/helpers');
+var path = require('path');
+var Q = require('q');
+var shell = require('shelljs');
+var events = require('cordova-common').events;
+var cordova = require('../src/cordova/cordova');
+var platforms = require('../src/platforms/platforms');
+var plugman = require('../src/plugman/plugman');
+var install = require('../src/plugman/install');
+var registry = require('../src/plugman/registry/registry');
 
 var util = require('../src/cordova/util');
 
@@ -71,14 +71,14 @@ function addPlugin (target, id, options) {
 // Runs: remove, list
 function removePlugin (id) {
     return cordova.plugin('rm', id)
-    .then(function () {
-        // The whole dir should be gone.
-        expect(path.join(project, 'plugins', id)).not.toExist();
-    }).then(function () {
-        return cordova.plugin('ls');
-    }).then(function () {
-        expect(results).toMatch(/No plugins added/gi);
-    });
+        .then(function () {
+            // The whole dir should be gone.
+            expect(path.join(project, 'plugins', id)).not.toExist();
+        }).then(function () {
+            return cordova.plugin('ls');
+        }).then(function () {
+            expect(results).toMatch(/No plugins added/gi);
+        });
 }
 
 var errorHandler = {
@@ -126,23 +126,23 @@ describe('plugin end-to-end', function () {
     });
 
     afterEach(function () {
-        process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
+        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
         expect(errorHandler.errorCallback).not.toHaveBeenCalled();
     });
 
     it('Test 001 : should successfully add and remove a plugin with no options', function (done) {
         addPlugin(path.join(pluginsDir, 'fake1'), pluginId, {}, done)
-        .then(function () {
-            expect(install.runInstall).toHaveBeenCalled();
-            expect(platforms.getPlatformApi.calls.count()).toEqual(1);
-            return removePlugin(pluginId);
-        }).then(function () {
-            expect(platforms.getPlatformApi.calls.count()).toEqual(2);
-        }).fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(install.runInstall).toHaveBeenCalled();
+                expect(platforms.getPlatformApi.calls.count()).toEqual(1);
+                return removePlugin(pluginId);
+            }).then(function () {
+                expect(platforms.getPlatformApi.calls.count()).toEqual(2);
+            }).fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 004 : should successfully add a plugin using relative path when running from subdir inside of project', function (done) {
@@ -159,55 +159,55 @@ describe('plugin end-to-end', function () {
 
         // Add plugin using relative path
         addPlugin(path.relative(subdir, plugindir), pluginId, {}, done)
-        .then(function () {
-            return removePlugin(pluginId);
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                return removePlugin(pluginId);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 005 : should respect preference default values', function (done) {
-        addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables, {cli_variables: { REQUIRED: 'NO', REQUIRED_ANDROID: 'NO'}}, done)
-       .then(function () {
-           var platformJsonPath = path.join(project, 'plugins', helpers.testPlatform + '.json');
-           var installed_plugins = require(platformJsonPath).installed_plugins;
-           var defaultPluginPreferences = installed_plugins[org_test_defaultvariables];
-           expect(defaultPluginPreferences).toBeDefined();
-           expect(defaultPluginPreferences.DEFAULT).toBe('yes');
-           expect(defaultPluginPreferences.DEFAULT_ANDROID).toBe('yes');
-           expect(defaultPluginPreferences.REQUIRED_ANDROID).toBe('NO');
-           expect(defaultPluginPreferences.REQUIRED).toBe('NO');
-           return removePlugin(org_test_defaultvariables);
-       })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+        addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables, {cli_variables: { REQUIRED: 'NO', REQUIRED_ANDROID: 'NO' }}, done)
+            .then(function () {
+                var platformJsonPath = path.join(project, 'plugins', helpers.testPlatform + '.json');
+                var installed_plugins = require(platformJsonPath).installed_plugins;
+                var defaultPluginPreferences = installed_plugins[org_test_defaultvariables];
+                expect(defaultPluginPreferences).toBeDefined();
+                expect(defaultPluginPreferences.DEFAULT).toBe('yes');
+                expect(defaultPluginPreferences.DEFAULT_ANDROID).toBe('yes');
+                expect(defaultPluginPreferences.REQUIRED_ANDROID).toBe('NO');
+                expect(defaultPluginPreferences.REQUIRED).toBe('NO');
+                return removePlugin(org_test_defaultvariables);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 006 : should successfully add a plugin when specifying CLI variables', function (done) {
-        addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables, {cli_variables: { REQUIRED: 'yes', REQUIRED_ANDROID: 'yes'}}, done)
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+        addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables, {cli_variables: { REQUIRED: 'yes', REQUIRED_ANDROID: 'yes' }}, done)
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 007 : should not check npm info when using the searchpath flag', function (done) {
         mockPluginFetch(npmInfoTestPlugin, path.join(pluginsDir, npmInfoTestPlugin));
         spyOn(registry, 'info');
         return addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {searchpath: pluginsDir}, done)
-        .then(function () {
-            expect(registry.info).not.toHaveBeenCalled();
-            var fetchOptions = plugman.fetch.calls.mostRecent().args[2];
-            expect(fetchOptions.searchpath[0]).toExist();
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(registry.info).not.toHaveBeenCalled();
+                var fetchOptions = plugman.fetch.calls.mostRecent().args[2];
+                expect(fetchOptions.searchpath[0]).toExist();
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 008 : should not check npm info when using the noregistry flag', function (done) {
@@ -215,28 +215,28 @@ describe('plugin end-to-end', function () {
 
         spyOn(registry, 'info');
         addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {noregistry: true}, done)
-        .then(function () {
-            expect(registry.info).not.toHaveBeenCalled();
-
-            var fetchOptions = plugman.fetch.calls.mostRecent().args[2];
-            expect(fetchOptions.noregistry).toBeTruthy();
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(registry.info).not.toHaveBeenCalled();
+
+                var fetchOptions = plugman.fetch.calls.mostRecent().args[2];
+                expect(fetchOptions.noregistry).toBeTruthy();
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 009 : should not check npm info when fetching from a Git repository', function (done) {
         spyOn(registry, 'info');
         addPlugin(testGitPluginRepository, testGitPluginId, {}, done)
-        .then(function () {
-            expect(registry.info).not.toHaveBeenCalled();
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(registry.info).not.toHaveBeenCalled();
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 010 : should select the plugin version based on npm info when fetching from npm', function (done) {
@@ -244,16 +244,16 @@ describe('plugin end-to-end', function () {
 
         spyOn(registry, 'info').and.callThrough();
         addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {'fetch': true}, done)
-        .then(function () {
-            expect(registry.info).toHaveBeenCalled();
-
-            var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
-            expect(fetchTarget).toEqual(npmInfoTestPlugin + '@' + npmInfoTestPluginVersion);
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(registry.info).toHaveBeenCalled();
+
+                var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
+                expect(fetchTarget).toEqual(npmInfoTestPlugin + '@' + npmInfoTestPluginVersion);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 011 : should handle scoped npm packages', function (done) {
@@ -262,19 +262,19 @@ describe('plugin end-to-end', function () {
 
         spyOn(registry, 'info').and.returnValue(Q({}));
         addPlugin(scopedPackage, npmInfoTestPlugin, {}, done)
-        .then(function () {
-            // Check to make sure that we are at least trying to get the correct package.
-            // This package is not published to npm, so we can't truly do end-to-end tests
-
-            expect(registry.info).toHaveBeenCalledWith([scopedPackage]);
-
-            var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
-            expect(fetchTarget).toEqual(scopedPackage);
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                // Check to make sure that we are at least trying to get the correct package.
+                // This package is not published to npm, so we can't truly do end-to-end tests
+
+                expect(registry.info).toHaveBeenCalledWith([scopedPackage]);
+
+                var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
+                expect(fetchTarget).toEqual(scopedPackage);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 
     it('Test 012 : should handle scoped npm packages with given version tags', function (done) {
@@ -283,15 +283,15 @@ describe('plugin end-to-end', function () {
 
         spyOn(registry, 'info');
         addPlugin(scopedPackage, npmInfoTestPlugin, {}, done)
-        .then(function () {
-            expect(registry.info).not.toHaveBeenCalled();
-
-            var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
-            expect(fetchTarget).toEqual(scopedPackage);
-        })
-        .fail(function (err) {
-            expect(err).toBeUndefined();
-        })
-        .fin(done);
+            .then(function () {
+                expect(registry.info).not.toHaveBeenCalled();
+
+                var fetchTarget = plugman.fetch.calls.mostRecent().args[0];
+                expect(fetchTarget).toEqual(scopedPackage);
+            })
+            .fail(function (err) {
+                expect(err).toBeUndefined();
+            })
+            .fin(done);
     }, 30000);
 });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d19951b3/integration-tests/plugin_fetch.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/plugin_fetch.spec.js b/integration-tests/plugin_fetch.spec.js
index ec0f14e..5e5297b 100644
--- a/integration-tests/plugin_fetch.spec.js
+++ b/integration-tests/plugin_fetch.spec.js
@@ -19,11 +19,11 @@
 
 // TODO: all of these tests should go as unit tests to src/cordova/plugin/add
 
-var plugin = require('../src/cordova/plugin/add'),
-    helpers = require('../spec/helpers'),
-    path = require('path'),
-    events = require('cordova-common').events,
-    shell = require('shelljs');
+var plugin = require('../src/cordova/plugin/add');
+var helpers = require('../spec/helpers');
+var path = require('path');
+var events = require('cordova-common').events;
+var shell = require('shelljs');
 
 var testPluginVersions = [
     '0.0.2',
@@ -68,11 +68,11 @@ function testEngineWithProject (done, testEngine, testResult) {
             'engines': { 'cordovaDependencies': testEngine },
             'versions': testPluginVersions
         }, cordovaVersion)
-    .then(function (toFetch) {
-        expect(toFetch).toBe(testResult);
-    })
-    .fail(getVersionErrorCallback)
-    .fin(done);
+        .then(function (toFetch) {
+            expect(toFetch).toBe(testResult);
+        })
+        .fail(getVersionErrorCallback)
+        .fin(done);
 }
 
 // Checks the warnings that were printed by the CLI to ensure that the code is
@@ -378,10 +378,10 @@ describe('plugin fetching version selection', function () {
             name: 'test-plugin',
             versions: testPluginVersions
         }, cordovaVersion)
-        .then(function (toFetch) {
-            expect(toFetch).toBe(null);
-        })
-        .fail(getVersionErrorCallback).fin(done);
+            .then(function (toFetch) {
+                expect(toFetch).toBe(null);
+            })
+            .fail(getVersionErrorCallback).fin(done);
     });
 
     it('Test 016 : should not fail if there is no cordovaDependencies in the engines', function (done) {
@@ -396,10 +396,10 @@ describe('plugin fetching version selection', function () {
                 'npm': '~2.0.0'
             }
         }, cordovaVersion)
-        .then(function (toFetch) {
-            expect(toFetch).toBe(null);
-        })
-        .fail(getVersionErrorCallback).fin(after);
+            .then(function (toFetch) {
+                expect(toFetch).toBe(null);
+            })
+            .fail(getVersionErrorCallback).fin(after);
 
     });
 
@@ -434,9 +434,9 @@ describe('plugin fetching version selection', function () {
     it('Test 019 : should ignore badly typed constraint entries', function (done) {
         var testEngine = {
             '0.0.2': { 'cordova': 1 },
-            '0.7.0': { 'cordova': {}},
-            '1.0.0': { 'cordova': undefined},
-            '1.1.3': { 8: '5.0.0'},
+            '0.7.0': { 'cordova': {} },
+            '1.0.0': { 'cordova': undefined },
+            '1.1.3': { 8: '5.0.0' },
             '1.3.0': { 'cordova': [] },
             '1.7.1': { 'cordova': null }
         };
@@ -469,8 +469,8 @@ describe('plugin fetching version selection', function () {
             'notAVersion': { 'cordova-android': '3.1.0' },
             '^1.1.2': { 'cordova-android': '3.1.0' },
             '<=1.3.0': { 'cordova-android': '3.1.0' },
-            '1.0.0': { 'cordova-android': '~3' },   // Good semver
-            '2.0.0': { 'cordova-android': '5.1.0' },   // Good semver
+            '1.0.0': { 'cordova-android': '~3' }, // Good semver
+            '2.0.0': { 'cordova-android': '5.1.0' }, // Good semver
             '1.0': { 'cordova-android': '3.1.0' },
             '2': { 'cordova-android': '3.1.0' }
         };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message