diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-06-02 01:13:36 +1000 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-01 11:13:36 -0400 |
commit | d438a6d259f79d1dd98d50ada01debbe24ca5a29 (patch) | |
tree | 04484b78fa46915c25d23547b7beb9f544091a2e /js/unit_test_runner.ts | |
parent | 79f770b178da2d74f10eaa5668b3c3521ab6bb59 (diff) |
Upgrade TypeScript to 3.5.1 (#2437)
Diffstat (limited to 'js/unit_test_runner.ts')
-rwxr-xr-x | js/unit_test_runner.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/js/unit_test_runner.ts b/js/unit_test_runner.ts index 7810e3f45..3a34df742 100755 --- a/js/unit_test_runner.ts +++ b/js/unit_test_runner.ts @@ -3,6 +3,12 @@ import "./unit_tests.ts"; import { permissionCombinations, parseUnitTestOutput } from "./test_util.ts"; +interface TestResult { + perms: string; + output: string; + result: number; +} + function permsToCliFlags(perms: Deno.Permissions): string[] { return Object.keys(perms) .map( @@ -39,7 +45,7 @@ async function main(): Promise<void> { console.log("\t" + fmtPerms(perms)); } - const testResults = new Set(); + const testResults = new Set<TestResult>(); for (const perms of permissionCombinations.values()) { const permsFmt = fmtPerms(perms); @@ -84,10 +90,10 @@ async function main(): Promise<void> { // run should fail let testsFailed = false; - for (const testResult of testResults.values()) { + for (const testResult of testResults) { console.log(`Summary for ${testResult.perms}`); console.log(testResult.output + "\n"); - testsFailed = testsFailed || testResult.result; + testsFailed = testsFailed || Boolean(testResult.result); } if (testsFailed) { |