diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /cli/tests/permission_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'cli/tests/permission_test.ts')
-rw-r--r-- | cli/tests/permission_test.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cli/tests/permission_test.ts b/cli/tests/permission_test.ts index bcfb840bf..399c757d3 100644 --- a/cli/tests/permission_test.ts +++ b/cli/tests/permission_test.ts @@ -1,23 +1,21 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -const { args, listen, env, exit, makeTempDirSync, readFileSync, run } = Deno; - -const name = args[0]; +const name = Deno.args[0]; const test: { [key: string]: Function } = { readRequired(): Promise<void> { - readFileSync("README.md"); + Deno.readFileSync("README.md"); return Promise.resolve(); }, writeRequired(): void { - makeTempDirSync(); + Deno.makeTempDirSync(); }, envRequired(): void { - env.get("home"); + Deno.env.get("home"); }, netRequired(): void { - listen({ transport: "tcp", port: 4541 }); + Deno.listen({ transport: "tcp", port: 4541 }); }, runRequired(): void { - run({ + Deno.run({ cmd: [ "python", "-c", @@ -29,7 +27,7 @@ const test: { [key: string]: Function } = { if (!test[name]) { console.log("Unknown test:", name); - exit(1); + Deno.exit(1); } test[name](); |