From efd7e78af3fc086dfdec51738905665d38d08eb4 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 28 Oct 2019 00:22:53 +0900 Subject: Use web standard Permissions API (#3200) --- cli/js/unit_test_runner.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cli/js/unit_test_runner.ts') diff --git a/cli/js/unit_test_runner.ts b/cli/js/unit_test_runner.ts index 913c575b2..ae255c385 100755 --- a/cli/js/unit_test_runner.ts +++ b/cli/js/unit_test_runner.ts @@ -1,7 +1,11 @@ #!/usr/bin/env -S deno run --reload --allow-run // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; -import { permissionCombinations, parseUnitTestOutput } from "./test_util.ts"; +import { + permissionCombinations, + parseUnitTestOutput, + Permissions +} from "./test_util.ts"; interface TestResult { perms: string; @@ -9,7 +13,7 @@ interface TestResult { result: number; } -function permsToCliFlags(perms: Deno.Permissions): string[] { +function permsToCliFlags(perms: Permissions): string[] { return Object.keys(perms) .map( (key): string => { @@ -25,7 +29,7 @@ function permsToCliFlags(perms: Deno.Permissions): string[] { .filter((e): boolean => e.length > 0); } -function fmtPerms(perms: Deno.Permissions): string { +function fmtPerms(perms: Permissions): string { let fmt = permsToCliFlags(perms).join(" "); if (!fmt) { -- cgit v1.2.3