◐ Shell
clean mode source ↗

test: fix determining lower priority · nodejs/node@97458ad

Original file line numberDiff line numberDiff line change

@@ -84,7 +84,8 @@ assert.ok(hostname.length > 0);

8484

// IBMi process priority is different.

8585

if (!common.isIBMi) {

8686

const { PRIORITY_BELOW_NORMAL, PRIORITY_LOW } = os.constants.priority;

87-

const LOWER_PRIORITY = os.getPriority() > PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW;

87+

// Priority means niceness: higher numeric value <=> lower priority

88+

const LOWER_PRIORITY = os.getPriority() < PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW;

8889

os.setPriority(LOWER_PRIORITY);

8990

const priority = os.getPriority();

9091

is.number(priority);