summaryrefslogtreecommitdiff
path: root/cli/tests/complex_permissions_test.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-06-12 20:23:38 +0100
committerGitHub <noreply@github.com>2020-06-12 15:23:38 -0400
commit1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch)
tree12074b6d44736b11513d857e437f9e30a6bf65a4 /cli/tests/complex_permissions_test.ts
parent26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff)
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'cli/tests/complex_permissions_test.ts')
-rw-r--r--cli/tests/complex_permissions_test.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/cli/tests/complex_permissions_test.ts b/cli/tests/complex_permissions_test.ts
index 55b4ead35..ad8b5302c 100644
--- a/cli/tests/complex_permissions_test.ts
+++ b/cli/tests/complex_permissions_test.ts
@@ -1,14 +1,12 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-const { args, readFileSync, writeFileSync, exit } = Deno;
-
-const name = args[0];
+const name = Deno.args[0];
const test: { [key: string]: Function } = {
read(files: string[]): void {
- files.forEach((file) => readFileSync(file));
+ files.forEach((file) => Deno.readFileSync(file));
},
write(files: string[]): void {
files.forEach((file) =>
- writeFileSync(file, new Uint8Array(0), { append: true })
+ Deno.writeFileSync(file, new Uint8Array(0), { append: true })
);
},
netFetch(hosts: string[]): void {
@@ -40,7 +38,7 @@ const test: { [key: string]: Function } = {
if (!test[name]) {
console.log("Unknown test:", name);
- exit(1);
+ Deno.exit(1);
}
-test[name](args.slice(1));
+test[name](Deno.args.slice(1));