From cda09c166fd075590c1f8dd313d4f57a560ecbd8 Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Wed, 19 May 2021 00:24:01 +0900 Subject: chore: update deno_lint binary used in CI to v0.5.0 (#10652) --- tools/wpt/runner.ts | 4 ++-- tools/wpt/testharnessreport.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'tools') 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( 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 { 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); }); -- cgit v1.2.3