diff options
author | Yusuke Tanaka <yusuktan@maguro.dev> | 2021-05-19 00:24:01 +0900 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:28 +0200 |
commit | 22426fee1ee37149175a564c6102a6a3ca99fb42 (patch) | |
tree | 462d8cd82bbcebdb665733ad9f4d0a32b0439d0e /tools/wpt | |
parent | d987ca5b0767d75b59b7c6c16840b164a4c786c4 (diff) |
chore: update deno_lint binary used in CI to v0.5.0 (#10652)
Diffstat (limited to 'tools/wpt')
-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); }); |