[Pkg-javascript-commits] [node-async] 257/480: skip stack overflow test in the browser - it takes ages when using settimeout fallback

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:32 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit e4979da603ddd1568fdbf19df640a041b6f392b4
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date:   Thu Jan 31 14:59:06 2013 +0000

    skip stack overflow test in the browser - it takes ages when using settimeout fallback
---
 test/test-async.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/test-async.js b/test/test-async.js
index e369f0c..da6956a 100644
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -2028,23 +2028,27 @@ exports['queue events'] = function(test) {
 };
 
 exports['avoid stack overflows for sync tasks'] = function (test) {
+    if (typeof window !== 'undefined') {
+        // skip this test in the browser, it takes AGES
+        return test.done();
+    }
     var arr = [];
     var funcarr = [];
-    for (var i = 0; i < 100000; i++) {
+    for (var i = 0; i < 10000; i++) {
         arr.push[i];
         funcarr.push(function (cb) { return cb(); });
     }
     var iter = function (i, cb) { cb(); };
     var counter = 0;
     var pred1 = function () {
-        return counter <= 100000;
+        return counter <= 10000;
     };
     var iter = function (cb) {
         counter++;
         cb();
     };
     var pred2 = function () {
-        return counter > 100000;
+        return counter > 10000;
     };
     var resetCounter = function (cb) {
         counter = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list