mirror of https://github.com/lukechilds/node.git
Browse Source
* 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>v7.x
committed by
James M Snell
2 changed files with 13 additions and 12 deletions
@ -1,10 +1,11 @@ |
|||
'use strict'; |
|||
var common = require('../common'); |
|||
var assert = require('assert'); |
|||
var path = require('path'); |
|||
var fs = require('fs'); |
|||
const common = require('../common'); |
|||
const assert = require('assert'); |
|||
const path = require('path'); |
|||
const fs = require('fs'); |
|||
|
|||
var filename = path.join(common.fixturesDir, 'does_not_exist.txt'); |
|||
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'); |
|||
})); |
|||
|
Loading…
Reference in new issue