From 51bbcf59beee1074044bfc541bada5e007c625b8 Mon Sep 17 00:00:00 2001
From: Mike Pennisi <mike@mikepennisi.com>
Date: Sun, 20 May 2018 15:15:48 -0400
Subject: [PATCH] Formalize asynchronous failure conditions

Previously, the error message generated by failed asynchronous tests was
generic and underspecified. Improve the format and explicitly document
it in project's interpreting guidelines.
---
 INTERPRETING.md            | 7 ++++---
 harness/doneprintHandle.js | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/INTERPRETING.md b/INTERPRETING.md
index 63992c9758..d2a5113ae9 100644
--- a/INTERPRETING.md
+++ b/INTERPRETING.md
@@ -330,8 +330,9 @@ following strings:
   considered complete until the implementation-defined `print` function has
   been invoked or some length of time has passed without any such invocation.
   In the event of a passing test run, this function will be invoked with the
-  string `'Test262:AsyncTestComplete'`. If invoked with any other value, the
-  test must be interpreted as failed. The implementation is free to select an
+  string `'Test262:AsyncTestComplete'`. If invoked with a string that is
+  prefixed with the character sequence `Test262:AsyncTestFailure:`, the test
+  must be interpreted as failed. The implementation is free to select an
   appropriate length of time to wait before considering the test "timed out"
   and failing.
 
@@ -345,7 +346,7 @@ following strings:
     .then(function() {
         print('Test262:AsyncTestComplete');
       }, function(reason) {
-        print('Error: ' + reason);
+        print('Test262:AsyncTestFailure: ' + reason);
       });
   ```
 
diff --git a/harness/doneprintHandle.js b/harness/doneprintHandle.js
index 625feef572..2b4ab88a03 100644
--- a/harness/doneprintHandle.js
+++ b/harness/doneprintHandle.js
@@ -13,5 +13,5 @@ function $DONE(){
   if(!arguments[0])
     __consolePrintHandle__('Test262:AsyncTestComplete');
   else
-    __consolePrintHandle__('Error: ' + arguments[0]);
+    __consolePrintHandle__('Test262:AsyncTestFailure:' + arguments[0]);
 }
-- 
GitLab