mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: improve test coverage for os
package
PR-URL: https://github.com/nodejs/node/pull/44959 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
e57713e337
commit
5e30559318
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user