Merge pull request #1563 from jugglinmike/formalize-async-failure

Formalize asynchronous failure conditions
This commit is contained in:
Rick Waldron 2018-05-21 15:04:10 -04:00 committed by GitHub
commit c440a325a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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);
});
```

View File

@ -13,5 +13,5 @@ function $DONE(){
if(!arguments[0])
__consolePrintHandle__('Test262:AsyncTestComplete');
else
__consolePrintHandle__('Error: ' + arguments[0]);
__consolePrintHandle__('Test262:AsyncTestFailure:' + arguments[0]);
}