Display more readable stack trace in HTML file that runs single test

This commit is contained in:
Alexey Andreev 2021-02-27 22:07:34 +03:00
parent 0ade0313ce
commit d1606ea2a5

View File

@ -9,7 +9,9 @@
<script type="text/javascript"> <script type="text/javascript">
main(["${IDENTIFIER}"], function(result) { main(["${IDENTIFIER}"], function(result) {
var message = result instanceof Error ? buildErrorMessage(result) : "OK"; var message = result instanceof Error ? buildErrorMessage(result) : "OK";
document.body.appendChild(document.createTextNode(message)) var pre = document.createElement("pre");
document.body.appendChild(pre);
pre.appendChild(document.createTextNode(message));
}); });
function buildErrorMessage(e) { function buildErrorMessage(e) {