diff options
author | Benjamin Lupton <b@lupton.cc> | 2020-06-25 21:18:01 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 07:18:01 -0400 |
commit | 16038b8f82d0f3f610d97d721c39d6585fe90295 (patch) | |
tree | ad047651d40ba5de29dbf76c2fc47eba59336bc1 /std/node/process_test.ts | |
parent | 7ea3071db5b05cfe284fecfed28a66f7508dad6d (diff) |
fix(std/node/process): env, argv exports (#6455)
The promise approach still required permissions to be specified
at initialisation, rather than at request.
Using a Proxy instance solves this permission issue.
The Proxy instance approach also eliminates the need for the
await. Achieving direct compatibility with Node.js.
/ref pr #6392
/ref commit d16337cc9c59732fe81655482e08b72d844472e6
Diffstat (limited to 'std/node/process_test.ts')
-rw-r--r-- | std/node/process_test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/std/node/process_test.ts b/std/node/process_test.ts index 043a954f8..c4332af33 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -102,9 +102,9 @@ Deno.test({ Deno.test({ name: "process.argv", - async fn() { + fn() { assert(Array.isArray(process.argv)); - assert(Array.isArray(await argv)); + assert(Array.isArray(argv)); assert( process.argv[0].match(/[^/\\]*deno[^/\\]*$/), "deno included in the file name of argv[0]" @@ -115,8 +115,8 @@ Deno.test({ Deno.test({ name: "process.env", - async fn() { + fn() { assertEquals(typeof process.env.PATH, "string"); - assertEquals(typeof (await env).PATH, "string"); + assertEquals(typeof env.PATH, "string"); }, }); |