diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-10-05 23:57:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 18:27:20 +0000 |
commit | ab3c9d41e483e5a7e6a326c66af7052a51301f91 (patch) | |
tree | 8424ae7eb557d22a23a8af22a627382fff949b4f /cli/tests/unit_node/process_test.ts | |
parent | 176bf9ba5ffe1c925e7d6a395d0e946880afdcda (diff) |
fix(ext/node): implement uv.errname (#20785)
Fixes https://github.com/denoland/deno/issues/20617
Diffstat (limited to 'cli/tests/unit_node/process_test.ts')
-rw-r--r-- | cli/tests/unit_node/process_test.ts | 13 |
1 files changed, 13 insertions, 0 deletions
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"); + }, +}); |