Переглянути джерело

Output error events from provider in test runner

Now, 'error' events from the test runner are output to stderr.
Additionally, when debug is enabled, debug output is logged to
stderr instead of stdout (as was the case previously).
Solly Ross 11 роки тому
батько
коміт
93af721a27
1 змінених файлів з 7 додано та 1 видалено
  1. 7 1
      tests/run_from_console.js

+ 7 - 1
tests/run_from_console.js

@@ -297,10 +297,16 @@ if (!program.outputHtml && !program.generateHtml) {
 
   if (program.debug) {
     provider.on('console', function(line) {
-      console.log(line);
+      // log to stderr
+      console.error(line);
     });
   }
 
+  provider.on('error', function(line) {
+    // log to stderr
+    console.error('ERROR: ' + line);
+  });
+
   /*gprom.finally(function(ph) {
     ph.exit();
     // exit with a status code that actually gives information