Skip to content

Commit 3519d74

Browse files
juanarbolRafaelGSS
authored andcommitted
test: improve test coverage for os package
PR-URL: #44959 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5fce8e3 commit 3519d74

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/parallel/test-os-process-priority.js

+8
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ for (let i = PRIORITY_HIGHEST; i <= PRIORITY_LOW; i++) {
109109
checkPriority(process.pid, i);
110110
}
111111

112+
{
113+
assert.throws(() => { os.getPriority(-1); }, {
114+
code: 'ERR_SYSTEM_ERROR',
115+
message: /A system error occurred: uv_os_getpriority returned /,
116+
name: 'SystemError'
117+
});
118+
}
119+
112120

113121
function checkPriority(pid, expected) {
114122
const priority = os.getPriority(pid);

0 commit comments

Comments
 (0)