• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2require('../common');
3
4const assert = require('assert');
5const fs = require('fs');
6const path = require('path');
7
8const tmpdir = require('../common/tmpdir');
9tmpdir.refresh();
10
11// O_WRONLY without O_CREAT shall fail with ENOENT
12const pathNE = path.join(tmpdir.path, 'file-should-not-exist');
13assert.throws(
14  () => fs.openSync(pathNE, fs.constants.O_WRONLY),
15  (e) => e.code === 'ENOENT'
16);
17