diff --git a/test/parallel/test-process-constants-noatime.js b/test/parallel/test-process-constants-noatime.js index cf6b98f794157b..0503e67c38d6e8 100644 --- a/test/parallel/test-process-constants-noatime.js +++ b/test/parallel/test-process-constants-noatime.js @@ -2,10 +2,11 @@ require('../common'); const assert = require('assert'); - -const isLinux = process.platform === 'linux'; - -const O_NOATIME = process.binding('constants').O_NOATIME; -const expected = isLinux ? 0x40000 : undefined; - -assert.strictEqual(O_NOATIME, expected); +const constants = process.binding('constants'); + +if (process.platform === 'linux') { + assert('O_NOATIME' in constants); + assert.strictEqual(constants.O_NOATIME, 0x40000); +} else { + assert(!('O_NOATIME' in constants)); +}