Skip to content

Commit

Permalink
test(ext/node): assert imported argv0 value (#22568)
Browse files Browse the repository at this point in the history
  • Loading branch information
satyarohith authored Feb 23, 2024
1 parent 47dee65 commit d2ed219
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit_node/process_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import process, {
arch as importedArch,
argv,
argv0 as importedArgv0,
env,
pid as importedPid,
platform as importedPlatform,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d2ed219

Please sign in to comment.