summaryrefslogtreecommitdiff
path: root/tests/unit_node/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_node/os_test.ts')
-rw-r--r--tests/unit_node/os_test.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit_node/os_test.ts b/tests/unit_node/os_test.ts
index a75b66807..78636e755 100644
--- a/tests/unit_node/os_test.ts
+++ b/tests/unit_node/os_test.ts
@@ -8,6 +8,7 @@ import {
assertNotEquals,
assertThrows,
} from "@std/assert";
+import console from "node:console";
Deno.test({
name: "build architecture is a string",
@@ -298,7 +299,14 @@ Deno.test({
args: ["eval", "while (true) { console.log('foo') }"],
}).spawn();
assertThrows(
- () => os.setPriority(child.pid, os.constants.priority.PRIORITY_HIGH),
+ () => {
+ try {
+ os.setPriority(child.pid, os.constants.priority.PRIORITY_HIGH);
+ } catch (err) {
+ console.error(err);
+ throw err;
+ }
+ },
Deno.errors.PermissionDenied,
);
os.getPriority(child.pid);