summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-02-23 22:45:37 +0530
committerGitHub <noreply@github.com>2024-02-23 17:15:37 +0000
commitd2ed219dcbb8e9b688588d7524dfa7cd1ded7efe (patch)
tree0e4c20c0f4cf469c14c92b92ce65fa46b2781b23
parent47dee65e4ad20847108d2f7e590c001ca9b93204 (diff)
test(ext/node): assert imported argv0 value (#22568)
-rw-r--r--tests/unit_node/process_test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index 0bbc9981f..b685c779a 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -4,6 +4,7 @@
import process, {
arch as importedArch,
argv,
+ argv0 as importedArgv0,
env,
pid as importedPid,
platform as importedPlatform,
@@ -303,6 +304,12 @@ Deno.test({
process.argv0.match(/[^/\\]*deno[^/\\]*$/),
"deno included in the file name of argv[0]",
);
+ assertEquals(typeof importedArgv0, "string");
+ assert(
+ importedArgv0.match(/[^/\\]*deno[^/\\]*$/),
+ "deno included in the file name of argv[0]",
+ );
+
// Setting should be a noop
process.argv0 = "foobar";
assert(