blob: d3e78337673641d564fba73d1d423d0606e5cff6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
window.add_result_callback(({ message, name, stack, status }) => {
const data = new TextEncoder().encode(
`${JSON.stringify({ name, status, message, stack })}\n`,
);
let bytesWritten = 0;
while (bytesWritten < data.byteLength) {
bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten));
}
});
window.add_completion_callback((_tests, _harnessStatus) => {
Deno.exit(0);
});
|