mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix: validate integer values in Deno.exitCode
setter (#24068)
This commit is contained in:
parent
754f21f0cd
commit
eda43c46de
5 changed files with 90 additions and 135 deletions
|
@ -813,10 +813,6 @@ Deno.test("process.exitCode in should change exit code", async () => {
|
|||
"import process from 'node:process'; process.exitCode = 127;",
|
||||
127,
|
||||
);
|
||||
await exitCodeTest(
|
||||
"import process from 'node:process'; process.exitCode = 2.5;",
|
||||
2,
|
||||
);
|
||||
await exitCodeTest(
|
||||
"import process from 'node:process'; process.exitCode = '10';",
|
||||
10,
|
||||
|
@ -825,10 +821,6 @@ Deno.test("process.exitCode in should change exit code", async () => {
|
|||
"import process from 'node:process'; process.exitCode = '0x10';",
|
||||
16,
|
||||
);
|
||||
await exitCodeTest(
|
||||
"import process from 'node:process'; process.exitCode = NaN;",
|
||||
1,
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("Deno.exit should override process exit", async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue