mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
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.
This commit is contained in:
parent
fbccd8eeff
commit
51bbcf59be
@ -330,8 +330,9 @@ following strings:
|
|||||||
considered complete until the implementation-defined `print` function has
|
considered complete until the implementation-defined `print` function has
|
||||||
been invoked or some length of time has passed without any such invocation.
|
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
|
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
|
string `'Test262:AsyncTestComplete'`. If invoked with a string that is
|
||||||
test must be interpreted as failed. The implementation is free to select an
|
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"
|
appropriate length of time to wait before considering the test "timed out"
|
||||||
and failing.
|
and failing.
|
||||||
|
|
||||||
@ -345,7 +346,7 @@ following strings:
|
|||||||
.then(function() {
|
.then(function() {
|
||||||
print('Test262:AsyncTestComplete');
|
print('Test262:AsyncTestComplete');
|
||||||
}, function(reason) {
|
}, function(reason) {
|
||||||
print('Error: ' + reason);
|
print('Test262:AsyncTestFailure: ' + reason);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -13,5 +13,5 @@ function $DONE(){
|
|||||||
if(!arguments[0])
|
if(!arguments[0])
|
||||||
__consolePrintHandle__('Test262:AsyncTestComplete');
|
__consolePrintHandle__('Test262:AsyncTestComplete');
|
||||||
else
|
else
|
||||||
__consolePrintHandle__('Error: ' + arguments[0]);
|
__consolePrintHandle__('Test262:AsyncTestFailure:' + arguments[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user