mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
test(ext/node): assert imported argv0 value (#22568)
This commit is contained in:
parent
47dee65e4a
commit
d2ed219dcb
1 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
import process, {
|
import process, {
|
||||||
arch as importedArch,
|
arch as importedArch,
|
||||||
argv,
|
argv,
|
||||||
|
argv0 as importedArgv0,
|
||||||
env,
|
env,
|
||||||
pid as importedPid,
|
pid as importedPid,
|
||||||
platform as importedPlatform,
|
platform as importedPlatform,
|
||||||
|
@ -303,6 +304,12 @@ Deno.test({
|
||||||
process.argv0.match(/[^/\\]*deno[^/\\]*$/),
|
process.argv0.match(/[^/\\]*deno[^/\\]*$/),
|
||||||
"deno included in the file name of argv[0]",
|
"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
|
// Setting should be a noop
|
||||||
process.argv0 = "foobar";
|
process.argv0 = "foobar";
|
||||||
assert(
|
assert(
|
||||||
|
|
Loading…
Reference in a new issue