diff --git a/test/parallel/test-os-process-priority.js b/test/parallel/test-os-process-priority.js index c6fdbff9e554d9..2edabf53dff333 100644 --- a/test/parallel/test-os-process-priority.js +++ b/test/parallel/test-os-process-priority.js @@ -109,6 +109,14 @@ for (let i = PRIORITY_HIGHEST; i <= PRIORITY_LOW; i++) { checkPriority(process.pid, i); } +{ + assert.throws(() => { os.getPriority(-1); }, { + code: 'ERR_SYSTEM_ERROR', + message: /A system error occurred: uv_os_getpriority returned /, + name: 'SystemError' + }); +} + function checkPriority(pid, expected) { const priority = os.getPriority(pid);