node/test/simple/test-fs-open.js

18 lines
269 B
JavaScript

var common = require('../common');
var assert = require('assert');
var fs = require('fs');
var openFd;
fs.open(__filename, 'r', function(err, fd) {
if (err) {
throw err;
}
openFd = fd;
});
process.addListener('exit', function() {
assert.ok(openFd);
});