From 16038b8f82d0f3f610d97d721c39d6585fe90295 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Thu, 25 Jun 2020 21:18:01 +1000 Subject: 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 --- std/node/process_test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'std/node/process_test.ts') 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"); }, }); -- cgit v1.2.3