diff --git a/test/parallel/test-fs-read-stream-err.js b/test/parallel/test-fs-read-stream-err.js index 1bc2b6f0b0239c..9f03a98e4f36d1 100644 --- a/test/parallel/test-fs-read-stream-err.js +++ b/test/parallel/test-fs-read-stream-err.js @@ -1,33 +1,33 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var fs = require('fs'); +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); -var stream = fs.createReadStream(__filename, { +const stream = fs.createReadStream(__filename, { bufferSize: 64 }); -var err = new Error('BAM'); +const err = new Error('BAM'); stream.on('error', common.mustCall(function errorHandler(err_) { console.error('error event'); process.nextTick(function() { - assert.equal(stream.fd, null); - assert.equal(err_, err); + assert.strictEqual(stream.fd, null); + assert.strictEqual(err_, err); }); })); fs.close = common.mustCall(function(fd_, cb) { - assert.equal(fd_, stream.fd); + assert.strictEqual(fd_, stream.fd); process.nextTick(cb); }); -var read = fs.read; +const read = fs.read; fs.read = function() { // first time is ok. read.apply(fs, arguments); // then it breaks fs.read = function() { - var cb = arguments[arguments.length - 1]; + const cb = arguments[arguments.length - 1]; process.nextTick(function() { cb(err); });