diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/wpt/runner.ts | 4 | ||||
-rw-r--r-- | tools/wpt/testharnessreport.js | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tools/wpt/runner.ts b/tools/wpt/runner.ts index b106283d2..eae53094d 100644 --- a/tools/wpt/runner.ts +++ b/tools/wpt/runner.ts @@ -21,7 +21,7 @@ export async function runWithTestUtil<T>( if (req.status == 200) { break; } - } catch (err) { + } catch (_err) { // do nothing if this fails } const passedTime = performance.now() - start; @@ -61,7 +61,7 @@ export interface TestCaseResult { export async function runSingleTest( url: URL, - options: ManifestTestOptions, + _options: ManifestTestOptions, reporter: (result: TestCaseResult) => void, ): Promise<TestResult> { const bundle = await generateBundle(url); diff --git a/tools/wpt/testharnessreport.js b/tools/wpt/testharnessreport.js index 8cff0752c..d3e783376 100644 --- a/tools/wpt/testharnessreport.js +++ b/tools/wpt/testharnessreport.js @@ -1,13 +1,15 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. + window.add_result_callback(({ message, name, stack, status }) => { - Deno.writeAllSync( - Deno.stderr, - new TextEncoder().encode( - `${JSON.stringify({ name, status, message, stack })}\n`, - ), + 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) => { +window.add_completion_callback((_tests, _harnessStatus) => { Deno.exit(0); }); |