summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-05-19 00:24:01 +0900
committerGitHub <noreply@github.com>2021-05-18 17:24:01 +0200
commitcda09c166fd075590c1f8dd313d4f57a560ecbd8 (patch)
tree96cd94b36cc0b357f6d98964f3c46ad5a31391f7 /tools
parent21d62b9b9ed7b4cd375a2815bdd9d8ccaa85e537 (diff)
chore: update deno_lint binary used in CI to v0.5.0 (#10652)
Diffstat (limited to 'tools')
-rw-r--r--tools/wpt/runner.ts4
-rw-r--r--tools/wpt/testharnessreport.js14
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);
});