From d2ed219dcbb8e9b688588d7524dfa7cd1ded7efe Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Fri, 23 Feb 2024 22:45:37 +0530 Subject: [PATCH] test(ext/node): assert imported argv0 value (#22568) --- tests/unit_node/process_test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index 0bbc9981fe..b685c779a0 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(