diff options
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r-- | tests/unit_node/process_test.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index 24ef6a316..0bbc9981f 100644 --- a/tests/unit_node/process_test.ts +++ b/tests/unit_node/process_test.ts @@ -287,7 +287,17 @@ Deno.test({ Deno.test({ name: "process.argv0", - fn() { + async fn() { + const { stdout } = await new Deno.Command(Deno.execPath(), { + args: [ + "eval", + `import process from "node:process";console.log(process.argv0);`, + ], + stdout: "piped", + stderr: "null", + }).output(); + assertEquals(new TextDecoder().decode(stdout).trim(), Deno.execPath()); + assertEquals(typeof process.argv0, "string"); assert( process.argv0.match(/[^/\\]*deno[^/\\]*$/), |