From c19b2a761cca4cb6b811e4549e573b28dba1e99b Mon Sep 17 00:00:00 2001 From: Wael Date: Wed, 27 Sep 2023 08:22:32 -0700 Subject: [PATCH] test: add os setPriority, getPriority test coverage PR-URL: https://github.com/nodejs/node/pull/38771 Reviewed-By: Darshan Sen --- test/parallel/test-os.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index f0f55fbe261946..d82f2ece3159a6 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -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();