You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
426 B

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