mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 15:32:15 +00:00

Replace var keyword with const or let. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
18 lines
427 B
JavaScript
18 lines
427 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
const fn = path.join(common.fixturesDir, 'empty.txt');
|
|
|
|
fs.readFile(fn, function(err, data) {
|
|
assert.ok(data);
|
|
});
|
|
|
|
fs.readFile(fn, 'utf8', function(err, data) {
|
|
assert.strictEqual('', data);
|
|
});
|
|
|
|
assert.ok(fs.readFileSync(fn));
|
|
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
|