report debugger's test errors
authorFedor Indutny <fedor.indutny@gmail.com>
Thu, 3 Nov 2011 21:09:07 +0000 (03:09 +0600)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 3 Nov 2011 21:11:14 +0000 (14:11 -0700)
test/simple/test-debugger-repl.js

index 088bb48..500f179 100644 (file)
@@ -149,7 +149,12 @@ function quit() {
 }
 
 setTimeout(function() {
-  throw new Error('timeout!');
+  var err = 'Timeout';
+  if (expected.length > 0 && expected[0].lines) {
+    err = err + '. Expected: ' + expected[0].lines.shift();
+  }
+
+  throw new Error(err);
 }, 5000);
 
 process.once('uncaughtException', function(e) {