summaryrefslogtreecommitdiff
path: root/tests/unit_node/process_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r--tests/unit_node/process_test.ts39
1 files changed, 11 insertions, 28 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index 0e0f169d6..49de2dce1 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -25,7 +25,6 @@ import {
assertThrows,
fail,
} from "@std/assert";
-import { assertSpyCall, assertSpyCalls, spy } from "@std/testing/mock";
import { stripAnsiCode } from "@std/fmt/colors";
import * as path from "@std/path";
import { delay } from "@std/async/delay";
@@ -239,33 +238,6 @@ Deno.test({
},
});
-Deno.test({
- name: "process.on - ignored signals on windows",
- ignore: Deno.build.os !== "windows",
- fn() {
- const ignoredSignals = ["SIGHUP", "SIGUSR1", "SIGUSR2"];
-
- for (const signal of ignoredSignals) {
- using consoleSpy = spy(console, "warn");
- const handler = () => {};
- process.on(signal, handler);
- process.off(signal, handler);
- assertSpyCall(consoleSpy, 0, {
- args: [`Ignoring signal "${signal}" on Windows`],
- });
- }
-
- {
- using consoleSpy = spy(console, "warn");
- const handler = () => {};
- process.on("SIGTERM", handler);
- process.off("SIGTERM", handler);
- // No warning is made for SIGTERM
- assertSpyCalls(consoleSpy, 0);
- }
- },
-});
-
Deno.test(
{ permissions: { run: true, read: true } },
async function processKill() {
@@ -1175,3 +1147,14 @@ Deno.test("process.cpuUsage()", () => {
assert(typeof cpuUsage.user === "number");
assert(typeof cpuUsage.system === "number");
});
+
+Deno.test("process.stdout.columns writable", () => {
+ process.stdout.columns = 80;
+ assertEquals(process.stdout.columns, 80);
+});
+
+Deno.test("getBuiltinModule", () => {
+ assert(process.getBuiltinModule("fs"));
+ assert(process.getBuiltinModule("node:fs"));
+ assertEquals(process.getBuiltinModule("something"), undefined);
+});