mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
a7970c0a25
* var to const * add check that expected error is ENOENT * indexOf() to includes() PR-URL: https://github.com/nodejs/node/pull/8999 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
12 lines
350 B
JavaScript
12 lines
350 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const filename = path.join(common.fixturesDir, 'does_not_exist.txt');
|
|
fs.readFile(filename, 'latin1', common.mustCall(function(err, content) {
|
|
assert.ok(err);
|
|
assert.strictEqual(err.code, 'ENOENT');
|
|
}));
|