test: add os setPriority, getPriority test coverage

PR-URL: https://github.com/nodejs/node/pull/38771
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Wael authored and Ruy Adorno committed 2023-09-28 10:02:33 -04:00
1 parent ec323bbd99
commit e49a573752
1 file changed
+6
+6
View File
@@ -81,6 +81,12 @@ const hostname = os.hostname();
is.string(hostname);
assert.ok(hostname.length > 0);
const DUMMY_PRIORITY = 10;
os.setPriority(DUMMY_PRIORITY);
const priority = os.getPriority();
is.number(priority);
assert.strictEqual(priority, DUMMY_PRIORITY);
// On IBMi, os.uptime() returns 'undefined'
if (!common.isIBMi) {
const uptime = os.uptime();