From 20457acc965c47bf468c99318c97bf9cf01981c2 Mon Sep 17 00:00:00 2001 From: Sergey Chernyshev Date: Wed, 24 Apr 2024 23:39:10 +0200 Subject: [PATCH] test: add os setPriority, getPriority test coverage PR-URL: https://github.com/nodejs/node/pull/38771 Reviewed-By: Darshan Sen --- graal-nodejs/test/parallel/test-os.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graal-nodejs/test/parallel/test-os.js b/graal-nodejs/test/parallel/test-os.js index f0f55fbe261..d82f2ece315 100644 --- a/graal-nodejs/test/parallel/test-os.js +++ b/graal-nodejs/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();