0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/test/parallel/test-fs-exists.js

17 lines
358 B
JavaScript
Raw Normal View History

'use strict';
const common = require('../common');
var assert = require('assert');
var fs = require('fs');
var f = __filename;
fs.exists(f, common.mustCall(function(y) {
assert.strictEqual(y, true);
}));
fs.exists(f + '-NO', common.mustCall(function(y) {
assert.strictEqual(y, false);
}));
assert(fs.existsSync(f));
assert(!fs.existsSync(f + '-NO'));