cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [02/17] cordova-lib git commit: bump timeout on test that fetches/unpacks tarballs. also ensure failure cases invoke done so we dont wait in case error conditions get hit.
Date Fri, 09 Jun 2017 23:26:30 GMT
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.fil@gmail.com>
Authored: Thu Jun 8 18:06:48 2017 -0500
Committer: filmaj <maj.fil@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-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message