From 5095af78018f1d77374bc06cbb58231e631056b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 18 Oct 2023 01:51:39 +0200 Subject: fix(ext/node): process.argv0 (#20925) Fixes https://github.com/denoland/deno/issues/20924 --- cli/tests/unit_node/process_test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cli/tests/unit_node') diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index 78c5fcc97..1f4638b91 100644 --- a/cli/tests/unit_node/process_test.ts +++ b/cli/tests/unit_node/process_test.ts @@ -258,6 +258,23 @@ Deno.test({ }, }); +Deno.test({ + name: "process.argv0", + fn() { + assertEquals(typeof process.argv0, "string"); + assert( + process.argv0.match(/[^/\\]*deno[^/\\]*$/), + "deno included in the file name of argv[0]", + ); + // Setting should be a noop + process.argv0 = "foobar"; + assert( + process.argv0.match(/[^/\\]*deno[^/\\]*$/), + "deno included in the file name of argv[0]", + ); + }, +}); + Deno.test({ name: "process.execArgv", fn() { -- cgit v1.2.3