We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
os
1 parent 6831e2f commit 6c3c9e9Copy full SHA for 6c3c9e9
test/parallel/test-os-process-priority.js
@@ -109,6 +109,16 @@ for (let i = PRIORITY_HIGHEST; i <= PRIORITY_LOW; i++) {
109
checkPriority(process.pid, i);
110
}
111
112
+{
113
+ // From libuv docs
114
+ // "The priority value range is between -20 (high priority) and 19 (low priority)"
115
+ assert.throws(() => { os.getPriority(-21); }, {
116
+ code: 'ERR_SYSTEM_ERROR',
117
+ message: 'A system error occurred: uv_os_getpriority returned ESRCH (no such process)',
118
+ name: 'SystemError'
119
+ });
120
+}
121
+
122
123
function checkPriority(pid, expected) {
124
const priority = os.getPriority(pid);
0 commit comments