diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-10-18 01:51:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 01:51:39 +0200 |
commit | 5095af78018f1d77374bc06cbb58231e631056b9 (patch) | |
tree | 6774952a000d287ded4d98a81171414a2d955eb5 /cli/tests/unit_node/process_test.ts | |
parent | 7561f6eceacc46c6f4f5f66cf03e627821b64f02 (diff) |
fix(ext/node): process.argv0 (#20925)
Fixes https://github.com/denoland/deno/issues/20924
Diffstat (limited to 'cli/tests/unit_node/process_test.ts')
-rw-r--r-- | cli/tests/unit_node/process_test.ts | 17 |
1 files changed, 17 insertions, 0 deletions
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 @@ -259,6 +259,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() { assert(Array.isArray(process.execArgv)); |