From ab3c9d41e483e5a7e6a326c66af7052a51301f91 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 5 Oct 2023 23:57:20 +0530 Subject: fix(ext/node): implement uv.errname (#20785) Fixes https://github.com/denoland/deno/issues/20617 --- cli/tests/unit_node/process_test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli/tests/unit_node') diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index bcb7a9767..78c5fcc97 100644 --- a/cli/tests/unit_node/process_test.ts +++ b/cli/tests/unit_node/process_test.ts @@ -786,3 +786,16 @@ Deno.test({ worker.terminate(); }, }); + +Deno.test({ + name: "process.binding('uv').errname", + ignore: Deno.build.os === "windows", + fn() { + // @ts-ignore: untyped internal binding, not actually supposed to be + // used by userland modules in Node.js + const uv = process.binding("uv"); + assert(uv.errname); + assert(typeof uv.errname === "function"); + assertEquals(uv.errname(-1), "EPERM"); + }, +}); -- cgit v1.2.3