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/07/28 18:26:45 UTC

[14/18] cordova-lib git commit: CB-12895 : ran eslint --fix on cordova-lib

CB-12895 : ran eslint --fix on cordova-lib


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/17438d2b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/17438d2b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/17438d2b

Branch: refs/heads/master
Commit: 17438d2b51b6db6f09f66c04d07a2d6b36079323
Parents: 17be6c6
Author: Audrey So <au...@apache.org>
Authored: Wed Jul 19 09:54:49 2017 -0700
Committer: Audrey So <au...@apache.org>
Committed: Fri Jul 28 10:58:31 2017 -0700

----------------------------------------------------------------------
 integration-tests/.eslintrc.yml                 |    2 +
 integration-tests/HooksRunner.spec.js           |  133 +-
 integration-tests/fetch.spec.js                 |   88 +-
 integration-tests/pkgJson-restore.spec.js       | 2155 +++++++++---------
 integration-tests/pkgJson.spec.js               |  419 ++--
 integration-tests/platform.spec.js              |  178 +-
 integration-tests/plugin.spec.js                |  120 +-
 integration-tests/plugin_fetch.spec.js          |  253 +-
 integration-tests/plugman_fetch.spec.js         |  215 +-
 integration-tests/plugman_uninstall.spec.js     |  139 +-
 spec/common.js                                  |   20 +-
 spec/cordova/build.spec.js                      |   97 +-
 spec/cordova/compile.spec.js                    |  160 +-
 spec/cordova/cordova-lib.spec.js                |    4 +-
 spec/cordova/create.spec.js                     |   64 +-
 spec/cordova/emulate.spec.js                    |  226 +-
 spec/cordova/lazy_load.spec.js                  |  176 +-
 spec/cordova/metadata/blackberry_parser.spec.js |  143 +-
 spec/cordova/metadata/browser_parser.spec.js    |   64 +-
 spec/cordova/metadata/parser.spec.js            |   21 +-
 .../metadata/parserhelper/ParserHelper.spec.js  |   22 +-
 .../metadata/parserhelper/preferences.spec.js   |   70 +-
 spec/cordova/metadata/webos_parser.spec.js      |   65 +-
 spec/cordova/platform/addHelper.spec.js         |   78 +-
 spec/cordova/platform/index.spec.js             |  176 +-
 spec/cordova/platforms/PlatformApiPoly.spec.js  |  173 +-
 spec/cordova/platforms/platforms.spec.js        |    6 +-
 spec/cordova/plugin/search.spec.js              |    2 -
 spec/cordova/prepare.spec.js                    |   46 +-
 spec/cordova/project-metadata-apis.spec.js      |    8 +-
 spec/cordova/run.spec.js                        |  139 +-
 spec/cordova/serve.spec.js                      |   89 +-
 spec/cordova/util.spec.js                       |  127 +-
 spec/helpers.js                                 |   38 +-
 spec/plugman/add_platform.spec.js               |   54 +-
 spec/plugman/config.spec.js                     |   10 +-
 spec/plugman/create.spec.js                     |   82 +-
 spec/plugman/info.spec.js                       |   10 +-
 spec/plugman/install.spec.js                    |  615 ++---
 spec/plugman/owner.spec.js                      |   10 +-
 spec/plugman/platforms/blackberry10.spec.js     |   96 +-
 spec/plugman/platforms/common.spec.js           |  104 +-
 spec/plugman/platforms/tizen.spec.js            |   55 +-
 .../projects/android/platform_www/cordova.js    |    3 -
 spec/plugman/registry/registry.spec.js          |  120 +-
 spec/plugman/search.spec.js                     |   12 +-
 spec/plugman/util/csproj.spec.js                |   60 +-
 spec/plugman/util/dependencies.spec.js          |   40 +-
 src/CordovaExternalToolErrorContext.js          |    8 +-
 src/cordova/build.js                            |   24 +-
 src/cordova/clean.js                            |   36 +-
 src/cordova/compile.js                          |   43 +-
 src/cordova/config.js                           |   24 +-
 src/cordova/cordova.js                          |   24 +-
 src/cordova/create.js                           |    2 +-
 src/cordova/emulate.js                          |   57 +-
 src/cordova/info.js                             |   79 +-
 src/cordova/lazy_load.js                        |  168 +-
 src/cordova/metadata/blackberry10_parser.js     |   60 +-
 src/cordova/metadata/browser_parser.js          |   42 +-
 src/cordova/metadata/parser.js                  |    2 -
 .../metadata/parserhelper/ParserHelper.js       |    4 +-
 .../metadata/parserhelper/preferences.js        |   24 +-
 src/cordova/metadata/ubuntu_parser.js           |   90 +-
 src/cordova/metadata/webos_parser.js            |   91 +-
 src/cordova/platform/addHelper.js               |  372 +--
 src/cordova/platform/check.js                   |  176 +-
 src/cordova/platform/list.js                    |   44 +-
 src/cordova/platform/remove.js                  |  106 +-
 src/cordova/platform_metadata.js                |   40 +-
 src/cordova/plugin/add.js                       |  295 ++-
 src/cordova/plugin/list.js                      |   86 +-
 src/cordova/plugin/plugin_spec_parser.js        |    2 +-
 src/cordova/plugin/remove.js                    |  142 +-
 src/cordova/plugin/search.js                    |   26 +-
 src/cordova/prepare.js                          |  120 +-
 src/cordova/project_metadata.js                 |   13 +-
 src/cordova/remote_load.js                      |   14 +-
 src/cordova/requirements.js                     |   11 +-
 src/cordova/restore-util.js                     |  126 +-
 src/cordova/run.js                              |   61 +-
 src/cordova/serve.js                            |   82 +-
 src/cordova/targets.js                          |   24 +-
 src/cordova/util.js                             |  161 +-
 src/gitclone.js                                 |   53 +-
 src/hooks/Context.js                            |   14 +-
 src/hooks/HooksRunner.js                        |   90 +-
 src/hooks/scriptsFinder.js                      |   46 +-
 src/platforms/PlatformApiPoly.js                |  240 +-
 src/platforms/platforms.js                      |   10 +-
 src/plugman/browserify.js                       |  188 +-
 src/plugman/config.js                           |    2 +-
 src/plugman/create.js                           |   77 +-
 src/plugman/createpackagejson.js                |   38 +-
 src/plugman/fetch.js                            |  223 +-
 src/plugman/help.js                             |    6 +-
 src/plugman/info.js                             |    2 +-
 src/plugman/init-defaults.js                    |   65 +-
 src/plugman/install.js                          |  375 ++-
 src/plugman/owner.js                            |    2 +-
 src/plugman/platform.js                         |  104 +-
 src/plugman/platform_operation.js               |    4 +-
 src/plugman/platforms/blackberry10.js           |   45 +-
 src/plugman/platforms/browser.js                |   37 +-
 src/plugman/platforms/common.js                 |   78 +-
 src/plugman/platforms/tizen.js                  |   40 +-
 src/plugman/platforms/ubuntu.js                 |   77 +-
 src/plugman/platforms/webos.js                  |   40 +-
 src/plugman/plugman.js                          |   66 +-
 src/plugman/registry/manifest.js                |   66 +-
 src/plugman/registry/registry.js                |   52 +-
 src/plugman/search.js                           |    2 +-
 src/plugman/uninstall.js                        |  209 +-
 src/plugman/util/android-project.js             |   46 +-
 src/plugman/util/default-engines.js             |   46 +-
 src/plugman/util/dependencies.js                |   58 +-
 src/plugman/util/metadata.js                    |    9 +-
 src/plugman/util/plist-helpers.js               |   52 +-
 src/plugman/util/plugins.js                     |   21 +-
 src/plugman/util/search-and-replace.js          |   10 +-
 src/plugman/util/strip-license.js               |    2 +-
 src/util/alias.js                               |    4 +-
 src/util/npm-helper.js                          |   26 +-
 src/util/promise-util.js                        |   20 +-
 src/util/unpack.js                              |   47 +-
 src/util/windows/csproj.js                      |   56 +-
 src/util/windows/jsprojManager.js               |  151 +-
 templates/base.js                               |    4 +-
 128 files changed, 6199 insertions(+), 6270 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17438d2b/integration-tests/.eslintrc.yml
----------------------------------------------------------------------
diff --git a/integration-tests/.eslintrc.yml b/integration-tests/.eslintrc.yml
new file mode 100644
index 0000000..6afba65
--- /dev/null
+++ b/integration-tests/.eslintrc.yml
@@ -0,0 +1,2 @@
+env:
+    jasmine: true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17438d2b/integration-tests/HooksRunner.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/HooksRunner.spec.js b/integration-tests/HooksRunner.spec.js
index f076c16..3a4c69c 100644
--- a/integration-tests/HooksRunner.spec.js
+++ b/integration-tests/HooksRunner.spec.js
@@ -21,11 +21,11 @@
 
 var cordova = require('../src/cordova/cordova'),
     HooksRunner = require('../src/hooks/HooksRunner'),
-    shell  = require('shelljs'),
-    path   = require('path'),
-    fs     = require('fs'),
-    os     = require('os'),
-    Q      = require('q'),
+    shell = require('shelljs'),
+    path = require('path'),
+    fs = require('fs'),
+    os = require('os'),
+    Q = require('q'),
     child_process = require('child_process'),
     helpers = require('../spec/helpers'),
     PluginInfo = require('cordova-common').PluginInfo,
@@ -39,7 +39,7 @@ var dotCordova = path.join(project, '.cordova');
 var hooksDir = path.join(project, 'hooks');
 var hooksDirDot = path.join(project, '.cordova', 'hooks');
 var scriptsDir = path.join(project, 'scripts');
-var ext = platform.match(/(win32|win64)/)?'bat':'sh';
+var ext = platform.match(/(win32|win64)/) ? 'bat' : 'sh';
 var fixtures = path.join(__dirname, '..', 'spec', 'cordova', 'fixtures');
 var testPluginFixturePath = path.join(fixtures, 'plugins', 'com.plugin.withhooks');
 
@@ -54,7 +54,7 @@ shell.mkdir('-p', dotCordova);
 shell.cp('-R', path.join(fixtures, 'projWithHooks', '.cordova'), project);
 
 // copy sh/bat scripts
-if(ext === 'bat') {
+if (ext === 'bat') {
     shell.cp('-R', path.join(fixtures, 'projWithHooks', '_bat', '*'), project);
     shell.cp('-R', path.join(fixtures, 'projWithHooks', '_bat', '.cordova'), project);
 } else {
@@ -68,39 +68,39 @@ shell.chmod('-R', 'ug+x', scriptsDir);
 
 // To get more verbose output to help trace program flow, uncomment the lines below
 // TODO: think about how to factor this out so that it can be invoked from the command line
-//var events = require('cordova-common').events;
-//events.on('log', function(msg) { console.log(msg); });
-//events.on('verbose', function(msg) { console.log(msg); });
-//events.on('warn', function(msg) { console.log(msg); });
+// var events = require('cordova-common').events;
+// events.on('log', function(msg) { console.log(msg); });
+// events.on('verbose', function(msg) { console.log(msg); });
+// events.on('warn', function(msg) { console.log(msg); });
 
-describe('HooksRunner', function() {
+describe('HooksRunner', function () {
     var hooksRunner;
     var hookOptions;
     var testPluginInstalledPath;
     var projectRoot;
     var fire;
 
-    beforeEach(function() {
+    beforeEach(function () {
         process.chdir(project);
     });
 
-    afterEach(function() {
+    afterEach(function () {
         process.chdir(path.join(__dirname, '..'));  // Non e2e tests assume CWD is repo root.
     });
 
-    it('Test 001 : should throw if provided directory is not a cordova project', function() {
-        expect(function() {
+    it('Test 001 : should throw if provided directory is not a cordova project', function () {
+        expect(function () {
             new HooksRunner(tmpDir);
         }).toThrow();
     });
 
-    it('Test 002 : should not throw if provided directory is a cordova project', function() {
+    it('Test 002 : should not throw if provided directory is a cordova project', function () {
         expect(function () {
             new HooksRunner(project);
         }).not.toThrow();
     });
 
-    it('Test 003 : should init test fixtures', function(done) {
+    it('Test 003 : should init test fixtures', function (done) {
         hooksRunner = new HooksRunner(project);
 
         // Now we load the config.json in the newly created project and edit the target platform's lib entry
@@ -111,11 +111,11 @@ describe('HooksRunner', function() {
 
         // The config.json in the fixture project points at fake "local" paths.
         // Since it's not a URL, the lazy-loader will just return the junk path.
-        spyOn(superspawn, 'spawn').and.callFake(function(cmd, args) {
+        spyOn(superspawn, 'spawn').and.callFake(function (cmd, args) {
             if (cmd.match(/create\b/)) {
                 // This is a call to the bin/create script, so do the copy ourselves.
                 shell.cp('-R', path.join(fixtures, 'platforms', 'android'), path.join(project, 'platforms'));
-            } else if(cmd.match(/update\b/)) {
+            } else if (cmd.match(/update\b/)) {
                 fs.writeFileSync(path.join(project, 'platforms', helpers.testPlatform, 'updated'), 'I was updated!', 'utf-8');
             } else if (cmd.match(/version/)) {
                 return '3.6.0';
@@ -123,7 +123,6 @@ describe('HooksRunner', function() {
             return Q();
         });
 
-
         // Add the testing platform.
         cordova.platform('add', [helpers.testPlatform]).fail(function (err) {
             expect(err).toBeUndefined();
@@ -154,8 +153,8 @@ describe('HooksRunner', function() {
         });
     }, 100000);
 
-    describe('fire method', function() {
-        beforeEach(function() {
+    describe('fire method', function () {
+        beforeEach(function () {
             projectRoot = cordovaUtil.isCordova();
 
             var options = {
@@ -174,12 +173,12 @@ describe('HooksRunner', function() {
         });
 
         // helper methods
-        function hooksOrderFileContents(hooksOrderFile) {
+        function hooksOrderFileContents (hooksOrderFile) {
             var order = fs.readFileSync(hooksOrderFile, 'ascii').replace(/\W/gm, ' ');
 
             var orderArrOriginal = order.split(' ').slice(0);
 
-            function splitNumbers(mixedString) {
+            function splitNumbers (mixedString) {
                 var re = /\w+/g, match, params = [];
 
                 while (match = re.exec(mixedString)) {
@@ -188,77 +187,77 @@ describe('HooksRunner', function() {
                 return params;
             }
 
-            return splitNumbers(orderArrOriginal).map(function(str) { return parseInt(str, 10); });
+            return splitNumbers(orderArrOriginal).map(function (str) { return parseInt(str, 10); });
         }
 
-        function hooksOrderFileIsOrdered(hooksOrderFile) {
+        function hooksOrderFileIsOrdered (hooksOrderFile) {
             var splitArrOriginal = hooksOrderFileContents(hooksOrderFile);
-            var splitArrSorted = splitArrOriginal.slice(0).sort(function(a, b) { return a - b; });
+            var splitArrSorted = splitArrOriginal.slice(0).sort(function (a, b) { return a - b; });
 
             return JSON.stringify(splitArrOriginal) === JSON.stringify(splitArrSorted);
         }
 
-        function backupAppConfig(projectRoot) {
+        function backupAppConfig (projectRoot) {
             shell.cp('-f', path.join(projectRoot, 'config.xml'), path.join(projectRoot, 'configOrig.xml'));
         }
 
-        function restoreAppConfig(projectRoot) {
+        function restoreAppConfig (projectRoot) {
             shell.cp('-f', path.join(projectRoot, 'configOrig.xml'), path.join(projectRoot, 'config.xml'));
             shell.rm('-rf', path.join(projectRoot, 'configOrig.xml'));
         }
 
-        function switchToOnlyNonPlatformScriptsAppConfig(projectRoot) {
+        function switchToOnlyNonPlatformScriptsAppConfig (projectRoot) {
             backupAppConfig(projectRoot);
             shell.cp('-f', path.join(projectRoot, 'configOnlyNonPlatformScripts_' + ext + '.xml'), path.join(projectRoot, 'config.xml'));
         }
 
-        function switchToOnePlatformScriptsAppConfig(projectRoot) {
+        function switchToOnePlatformScriptsAppConfig (projectRoot) {
             backupAppConfig(projectRoot);
             shell.cp('-f', path.join(projectRoot, 'configOnePlatform_' + ext + '.xml'), path.join(projectRoot, 'config.xml'));
         }
 
-        function switchToTwoPlatformsScriptsAppConfig(projectRoot) {
+        function switchToTwoPlatformsScriptsAppConfig (projectRoot) {
             backupAppConfig(projectRoot);
             shell.cp('-f', path.join(projectRoot, 'configTwoPlatforms_' + ext + '.xml'), path.join(projectRoot, 'config.xml'));
         }
 
-        function backupPluginConfig() {
+        function backupPluginConfig () {
             shell.cp('-f', path.join(testPluginInstalledPath, 'plugin.xml'), path.join(testPluginInstalledPath, 'pluginOrig.xml'));
         }
 
-        function restorePluginConfig() {
+        function restorePluginConfig () {
             shell.cp('-f', path.join(testPluginInstalledPath, 'pluginOrig.xml'), path.join(testPluginInstalledPath, 'plugin.xml'));
             shell.rm('-rf', path.join(testPluginInstalledPath, 'pluginOrig.xml'));
         }
 
-        function switchToOnlyNonPlatformScriptsPluginConfig(projectRoot) {
+        function switchToOnlyNonPlatformScriptsPluginConfig (projectRoot) {
             backupPluginConfig();
             shell.cp('-f', path.join(testPluginInstalledPath, 'pluginOnlyNonPlatformScripts_' + ext + '.xml'), path.join(testPluginInstalledPath, 'plugin.xml'));
         }
 
-        function switchToOnePlatformScriptsPluginConfig(projectRoot) {
+        function switchToOnePlatformScriptsPluginConfig (projectRoot) {
             backupPluginConfig();
             shell.cp('-f', path.join(testPluginInstalledPath, 'pluginOnePlatform_' + ext + '.xml'), path.join(testPluginInstalledPath, 'plugin.xml'));
         }
 
-        function switchToTwoPlatformsScriptsPluginConfig(projectRoot) {
+        function switchToTwoPlatformsScriptsPluginConfig (projectRoot) {
             backupPluginConfig();
             shell.cp('-f', path.join(testPluginInstalledPath, 'pluginTwoPlatforms_' + ext + '.xml'), path.join(testPluginInstalledPath, 'plugin.xml'));
         }
 
-        function removeFileIfExists(file) {
+        function removeFileIfExists (file) {
             if (fs.existsSync(file)) {
                 fs.unlinkSync(file);
             }
         }
 
-        describe('application hooks', function() {
+        describe('application hooks', function () {
             it('Test 004 : should execute hook scripts serially', function (done) {
                 var test_event = 'before_build';
                 var projectRoot = cordovaUtil.isCordova();
                 var hooksOrderFile = path.join(projectRoot, 'hooks_order.txt');
 
-                return hooksRunner.fire(test_event, hookOptions).then(function() {
+                return hooksRunner.fire(test_event, hookOptions).then(function () {
                     expect(hooksOrderFile).toExist();
 
                     expect(hooksOrderFileIsOrdered(hooksOrderFile)).toBe(true);
@@ -354,7 +353,7 @@ describe('HooksRunner', function() {
             });
         });
 
-        describe('plugin hooks', function() {
+        describe('plugin hooks', function () {
             it('Test 009 : should execute hook scripts serially from plugin.xml', function (done) {
                 var test_event = 'before_build';
                 var projectRoot = cordovaUtil.isCordova();
@@ -454,18 +453,18 @@ describe('HooksRunner', function() {
                         // Delete unique ids to allow comparing PluginInfo
                         delete androidPluginOpts.plugin.pluginInfo._et;
 
-                        fire.calls.all().forEach(function(call) {
-                            if(call.args[1] && call.args[1].plugin) {
+                        fire.calls.all().forEach(function (call) {
+                            if (call.args[1] && call.args[1].plugin) {
                                 // Delete unique ids to allow comparing PluginInfo
                                 delete call.args[1].plugin.pluginInfo._et;
                             }
 
-                            if(call.args[0] == 'before_plugin_uninstall' ||
+                            if (call.args[0] == 'before_plugin_uninstall' ||
                                 call.args[0] == 'before_plugin_install' ||
                                 call.args[0] == 'after_plugin_install') {
-                                if(call.args[1]) {
+                                if (call.args[1]) {
                                     expect(call.args[1].plugin).toBeDefined();
-                                    if(call.args[1].plugin.platform == 'android') {
+                                    if (call.args[1].plugin.platform == 'android') {
                                         expect(JSON.stringify(androidPluginOpts) ===
                                             JSON.stringify(call.args[1])).toBe(true);
                                     }
@@ -496,8 +495,8 @@ describe('HooksRunner', function() {
                 var test_events = ['before_build', 'after_plugin_add', 'before_platform_rm', 'before_prepare'];
                 hookOptions.nohooks = ['before*'];
 
-                return test_events.reduce(function(soFar, test_event) {
-                    return soFar.then(function() {
+                return test_events.reduce(function (soFar, test_event) {
+                    return soFar.then(function () {
                         return hooksRunner.fire(test_event, hookOptions).then(function (msg) {
                             if (msg) {
                                 expect(msg).toBe('hook ' + test_event + ' is disabled.');
@@ -517,8 +516,8 @@ describe('HooksRunner', function() {
                 var test_events = ['before_build', 'after_plugin_add', 'before_platform_rm', 'before_prepare'];
                 hookOptions.nohooks = ['.'];
 
-                return test_events.reduce(function(soFar, test_event) {
-                    return soFar.then(function() {
+                return test_events.reduce(function (soFar, test_event) {
+                    return soFar.then(function () {
                         return hooksRunner.fire(test_event, hookOptions).then(function (msg) {
                             expect(msg).toBeDefined();
                             expect(msg).toBe('hook ' + test_event + ' is disabled.');
@@ -532,7 +531,7 @@ describe('HooksRunner', function() {
             });
         });
 
-        describe('module-level hooks (event handlers)', function() {
+        describe('module-level hooks (event handlers)', function () {
             var handler = jasmine.createSpy().and.returnValue(Q());
             var test_event = 'before_build';
 
@@ -541,7 +540,7 @@ describe('HooksRunner', function() {
                 handler.calls.reset();
             });
 
-            it('Test 016 : should fire handlers using cordova.on', function(done) {
+            it('Test 016 : should fire handlers using cordova.on', function (done) {
                 cordova.on(test_event, handler);
                 hooksRunner.fire(test_event, hookOptions).then(function () {
                     expect(handler).toHaveBeenCalled();
@@ -560,7 +559,7 @@ describe('HooksRunner', function() {
                 }).fin(done);
             });
 
-            it('Test 018 : should be able to stop listening to events using cordova.off', function(done) {
+            it('Test 018 : should be able to stop listening to events using cordova.off', function (done) {
                 cordova.on(test_event, handler);
                 cordova.off(test_event, handler);
                 hooksRunner.fire(test_event, hookOptions).then(function () {
@@ -571,20 +570,20 @@ describe('HooksRunner', function() {
                 }).fin(done);
             });
 
-            it('Test 019 : should execute event listeners serially', function(done) {
+            it('Test 019 : should execute event listeners serially', function (done) {
                 var h1_fired = false;
                 var h2_fired;
-                var h1 = function() {
+                var h1 = function () {
                     expect(h2_fired).toBe(false);
                     // Delay 100 ms here to check that h2 is not executed until after
                     // the promise returned by h1 is resolved.
-                    var q = Q.delay(100).then(function() {
+                    var q = Q.delay(100).then(function () {
                         h1_fired = true;
                     });
                     return q;
                 };
                 h2_fired = false;
-                var h2 = function() {
+                var h2 = function () {
                     h2_fired = true;
                     expect(h1_fired).toBe(true);
                     return Q();
@@ -593,18 +592,18 @@ describe('HooksRunner', function() {
                 cordova.on(test_event, h1);
                 cordova.on(test_event, h2);
 
-                return hooksRunner.fire(test_event, hookOptions).then(function() {
+                return hooksRunner.fire(test_event, hookOptions).then(function () {
                     expect(h1_fired).toBe(true);
                     expect(h2_fired).toBe(true);
-                }).fail(function(err) {
+                }).fail(function (err) {
                     expect(err).toBeUndefined();
-                }).then(function() {
+                }).then(function () {
                     cordova.removeAllListeners(test_event);
                     done();
                 });
             });
 
-            it('Test 020 : should allow for hook to opt into asynchronous execution and block further hooks from firing using the done callback', function(done) {
+            it('Test 020 : should allow for hook to opt into asynchronous execution and block further hooks from firing using the done callback', function (done) {
                 var h1_fired = false;
                 var h2_fired;
                 var h1 = function () {
@@ -621,14 +620,14 @@ describe('HooksRunner', function() {
 
                 cordova.on(test_event, h1);
                 cordova.on(test_event, h2);
-                hooksRunner.fire(test_event, hookOptions).then(function() {
+                hooksRunner.fire(test_event, hookOptions).then(function () {
                     expect(h1_fired).toBe(true);
                     expect(h2_fired).toBe(true);
                     done();
                 });
             });
 
-            it('Test 021 : should pass data object that fire calls into async handlers', function(done) {
+            it('Test 021 : should pass data object that fire calls into async handlers', function (done) {
                 var async = function (opts) {
                     expect(opts).toEqual(hookOptions);
                     return Q();
@@ -639,7 +638,7 @@ describe('HooksRunner', function() {
                 });
             });
 
-            it('Test 022 : should pass data object that fire calls into sync handlers', function(done) {
+            it('Test 022 : should pass data object that fire calls into sync handlers', function (done) {
                 var async = function (opts) {
                     expect(opts).toEqual(hookOptions);
                 };
@@ -647,7 +646,7 @@ describe('HooksRunner', function() {
                 hooksRunner.fire(test_event, hookOptions).fin(done);
             });
 
-            it('Test 023 : should error if any script exits with non-zero code', function(done) {
+            it('Test 023 : should error if any script exits with non-zero code', function (done) {
                 hooksRunner.fire('fail', hookOptions).then(function () {
                     expect('the call').toBe('a failure');
                 }, function (err) {
@@ -656,7 +655,7 @@ describe('HooksRunner', function() {
             });
         });
 
-        it('Test 024 :should not error if the hook is unrecognized', function(done) {
+        it('Test 024 :should not error if the hook is unrecognized', function (done) {
             hooksRunner.fire('CLEAN YOUR SHORTS GODDAMNIT LIKE A BIG BOY!', hookOptions).fail(function (err) {
                 expect('Call with unrecognized hook ').toBe('successful.\n' + err);
             }).fin(done);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17438d2b/integration-tests/fetch.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/fetch.spec.js b/integration-tests/fetch.spec.js
index 693f925..b3fe45c 100644
--- a/integration-tests/fetch.spec.js
+++ b/integration-tests/fetch.spec.js
@@ -26,111 +26,109 @@ var TIMEOUT = 90000,
     plugins_dir = path.join(__dirname, '..', 'spec', 'plugman', 'plugins');
 
 var plugins = {
-    'Test1' : path.join(plugins_dir, 'dependencies', 'Test1'),
-    'Test2' : path.join(plugins_dir, 'dependencies', 'Test2'),
-    'Test3' : path.join(plugins_dir, 'dependencies', 'Test3'),
-    'Test4' : path.join(plugins_dir, 'dependencies', 'Test4')
-}
+    'Test1': path.join(plugins_dir, 'dependencies', 'Test1'),
+    'Test2': path.join(plugins_dir, 'dependencies', 'Test2'),
+    'Test3': path.join(plugins_dir, 'dependencies', 'Test3'),
+    'Test4': path.join(plugins_dir, 'dependencies', 'Test4')
+};
 
-
-describe('end-to-end plugin dependency tests', function() {
+describe('end-to-end plugin dependency tests', function () {
     var tmpDir, project, pluginsDir;
 
-    beforeEach(function() {
+    beforeEach(function () {
         tmpDir = helpers.tmpDir('plugin_dependency_test');
         project = path.join(tmpDir, 'hello3');
         pluginsDir = path.join(project, 'plugins');
         process.chdir(tmpDir);
     });
 
-    afterEach(function() {
+    afterEach(function () {
         process.chdir(path.join(__dirname, '..'));  // Needed to rm the dir on Windows.
         shell.rm('-rf', tmpDir);
     });
 
-    it('Test 029 : should fail if dependency already installed is wrong version', function(done) {
+    it('Test 029 : should fail if dependency already installed is wrong version', function (done) {
         cordova.create('hello3')
-        .then(function() {
+        .then(function () {
             process.chdir(project);
             return cordova.platform('add', 'android', {'fetch': true});
-        }).then(function() {
+        }).then(function () {
             return cordova.plugin('add', 'cordova-plugin-file', {'fetch': true});
-        }).then(function() {
+        }).then(function () {
             expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
             return cordova.plugin('add', plugins['Test1'], {'fetch': true});
-        }).fail(function(err) {
+        }).fail(function (err) {
             expect(err.message).toContain('does not satisfy dependency plugin requirement');
         })
         .fin(done);
     }, TIMEOUT);
 
-    it('Test 030 : should pass if dependency already installed is wrong version with --force', function(done) {
+    it('Test 030 : should pass if dependency already installed is wrong version with --force', function (done) {
         cordova.create('hello3')
-        .then(function() {
+        .then(function () {
             process.chdir(project);
             return cordova.platform('add', 'android', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', 'cordova-plugin-file', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
-            return cordova.plugin('add', plugins['Test1'], {'fetch': true, 'force':true});
+            return cordova.plugin('add', plugins['Test1'], {'fetch': true, 'force': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'Test1')).toExist();
         })
-        .fail(function(err) {
+        .fail(function (err) {
             expect(err).toBeUndefined();
         })
         .fin(done);
     }, TIMEOUT);
 
-
-    it('Test 031 : should pass if dependency already installed is same major version (if specific version is specified)', function(done) {
-        //Test1 requires cordova-plugin-file version 2.0.0 (which should automatically turn into ^2.0.0); we'll install version 2.1.0
+    it('Test 031 : should pass if dependency already installed is same major version (if specific version is specified)', function (done) {
+        // Test1 requires cordova-plugin-file version 2.0.0 (which should automatically turn into ^2.0.0); we'll install version 2.1.0
         cordova.create('hello3')
-        .then(function() {
+        .then(function () {
             process.chdir(project);
             return cordova.platform('add', 'android', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', 'cordova-plugin-file@2.1.0', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
             return cordova.plugin('add', plugins['Test1'], {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'Test1')).toExist();
         })
-        .fail(function(err) {
-            //console.error(err);
+        .fail(function (err) {
+            // console.error(err);
             expect(err).toBeUndefined();
         })
         .fin(done);
     }, TIMEOUT);
 
-    it('Test 032 : should handle two plugins with same dependent plugin', function(done) {
-        //Test1 and Test2 have compatible dependencies on cordova-plugin-file
-        //Test1 and Test3 have incompatible dependencies on cordova-plugin-file
+    it('Test 032 : should handle two plugins with same dependent plugin', function (done) {
+        // Test1 and Test2 have compatible dependencies on cordova-plugin-file
+        // Test1 and Test3 have incompatible dependencies on cordova-plugin-file
         cordova.create('hello3')
-        .then(function() {
+        .then(function () {
             process.chdir(project);
             return cordova.platform('add', 'android', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', plugins['Test1'], {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
             expect(path.join(pluginsDir, 'Test1')).toExist();
             return cordova.plugin('add', plugins['Test2'], {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', plugins['Test3'], {'fetch': true});
         })
-        .fail(function(err) {
+        .fail(function (err) {
             expect(path.join(pluginsDir, 'Test2')).toExist();
             expect(path.join(pluginsDir, 'Test3')).not.toExist();
             expect(err.message).toContain('does not satisfy dependency plugin requirement');
@@ -138,21 +136,21 @@ describe('end-to-end plugin dependency tests', function() {
         .fin(done);
     }, TIMEOUT);
 
-    it('Test 033 : should use a dev version of a dependent plugin if it is already installed', function(done) {
-        //Test4 has this dependency in its plugin.xml:
-        //<dependency id="cordova-plugin-file" url="https://github.com/apache/cordova-plugin-file" />
+    it('Test 033 : should use a dev version of a dependent plugin if it is already installed', function (done) {
+        // Test4 has this dependency in its plugin.xml:
+        // <dependency id="cordova-plugin-file" url="https://github.com/apache/cordova-plugin-file" />
         cordova.create('hello3')
-        .then(function() {
+        .then(function () {
             process.chdir(project);
             return cordova.platform('add', 'android', {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', 'https://github.com/apache/cordova-plugin-file');
         })
-        .then(function() {
+        .then(function () {
             return cordova.plugin('add', plugins['Test4'], {'fetch': true});
         })
-        .then(function() {
+        .then(function () {
             expect(path.join(pluginsDir, 'cordova-plugin-file')).toExist();
             expect(path.join(pluginsDir, 'Test4')).toExist();
         }, function (error) {


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