increase mocha default timeout (#3647)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sat, 28 Dec 2019 02:32:22 +0000 (02:32 +0000)
committerGitHub <noreply@github.com>
Sat, 28 Dec 2019 02:32:22 +0000 (02:32 +0000)
closes #3640

test/mocha.js

index 5d65a5a..04b42c1 100644 (file)
@@ -1,7 +1,7 @@
 var fs = require("fs");
 
 var config = {
-    limit: 5000,
+    limit: 10000,
     timeout: function(limit) {
         this.limit = limit;
     }
@@ -55,11 +55,11 @@ process.nextTick(function run() {
         var elapsed = Date.now();
         var timer;
         var done = function() {
-            reset();
             elapsed = Date.now() - elapsed;
             if (elapsed > task.limit) {
                 throw new Error("Timed out: " + elapsed + "ms > " + task.limit + "ms");
             }
+            reset();
             log_titles(console.log, task.titles, green('\u221A '));
             process.nextTick(run);
         };