We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 765f16c commit a094a81Copy full SHA for a094a81
test/parallel/test-os.js
@@ -83,11 +83,12 @@ assert.ok(hostname.length > 0);
83
84
// IBMi process priority is different.
85
if (!common.isIBMi) {
86
- const DUMMY_PRIORITY = 10;
87
- os.setPriority(DUMMY_PRIORITY);
+ const { PRIORITY_BELOW_NORMAL, PRIORITY_LOW } = os.constants.priority;
+ const LOWER_PRIORITY = os.getPriority() > PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW;
88
+ os.setPriority(LOWER_PRIORITY);
89
const priority = os.getPriority();
90
is.number(priority);
- assert.strictEqual(priority, DUMMY_PRIORITY);
91
+ assert.strictEqual(priority, LOWER_PRIORITY);
92
}
93
94
// On IBMi, os.uptime() returns 'undefined'
0 commit comments