blob: d3bd42227c2a53c4a0ce2895e49754337a9117d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
'use strict';
const common = require('../common');
const constants = require('constants');
const assert = require('assert');
const fs = require('fs');
const path = require('path');
common.refreshTmpDir();
// O_WRONLY without O_CREAT shall fail with ENOENT
const pathNE = path.join(common.tmpDir, 'file-should-not-exist');
assert.throws(
() => fs.openSync(pathNE, constants.O_WRONLY),
(e) => e.code === 'ENOENT'
);
|