bump timeout on test that fetches/unpacks tarballs. also ensure failure cases 
invoke done so we dont wait in case error conditions get hit.


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

Branch: refs/heads/no-lazy-load
Commit: 0593e8aeb4a57b75e6b67f89c7fc4e5c279118be
Parents: 57c212c
Author: filmaj <maj....@gmail.com>
Authored: Thu Jun 8 18:06:48 2017 -0500
Committer: filmaj <maj....@gmail.com>
Committed: Fri Jun 9 08:58:46 2017 -0500

----------------------------------------------------------------------
 spec-cordova/HooksRunner.spec.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0593e8ae/spec-cordova/HooksRunner.spec.js
----------------------------------------------------------------------
diff --git a/spec-cordova/HooksRunner.spec.js b/spec-cordova/HooksRunner.spec.js
index e121ee3..54d2ddc 100644
--- a/spec-cordova/HooksRunner.spec.js
+++ b/spec-cordova/HooksRunner.spec.js
@@ -30,6 +30,7 @@ var cordova = require('../src/cordova/cordova'),
     helpers = require('./helpers'),
     PluginInfo = require('cordova-common').PluginInfo,
     superspawn = require('cordova-common').superspawn,
+    events = require('cordova-common').events,
     config = require('../src/cordova/config');
 
 var platform = os.platform();
@@ -66,6 +67,12 @@ shell.chmod('-R', 'ug+x', hooksDir);
 shell.chmod('-R', 'ug+x', hooksDirDot);
 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
+//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() {
     var hooksRunner;
     var hookOptions;
@@ -120,6 +127,7 @@ describe('HooksRunner', function() {
         // Add the testing platform.
         cordova.raw.platform('add', [helpers.testPlatform]).fail(function 
(err) {
             expect(err).toBeUndefined();
+            done();
         }).then(function () {
             // Add the testing plugin
             projectRoot = cordovaUtil.isCordova();
@@ -136,13 +144,14 @@ describe('HooksRunner', function() {
 
             cordova.raw.plugin('add', testPluginFixturePath).fail(function 
(err) {
                 expect(err && err.stack).toBeUndefined();
+                done();
             }).then(function () {
                 testPluginInstalledPath = path.join(projectRoot, 'plugins', 
'com.plugin.withhooks');
                 shell.chmod('-R', 'ug+x', path.join(testPluginInstalledPath, 
'scripts'));
                 done();
             });
         });
-    });
+    }, 100000);
 
     describe('fire method', function() {
         beforeEach(function() {


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

Reply via email to