node/test/parallel/test-process-constants-noatime.js
Sakthipriyan Vairamani 7d3f5751b3 test: make sure O_NOATIME is present only in Linux
As it is, the test checks if the return value is `undefined` in other
platforms. But it should also make sure that the `O_NOATIME` should be
found only in Linux.

PR-URL: https://github.com/nodejs/node/pull/6614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-05-17 08:51:36 -05:00

12 lines
294 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
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));
}