From 5bd13a3d6cfeed0a08fd81faf85e6cdae446c045 Mon Sep 17 00:00:00 2001 From: nohmapp Date: Sat, 24 Sep 2016 14:09:26 -0700 Subject: [PATCH] test: cleanup parallel/test-fs-readfile-unlink.js Changes var to const, != to !==, and assert.equal() to assert.strict Equal() PR-URL: https://github.com/nodejs/node/pull/8764 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Ilkka Myller --- test/parallel/test-fs-readfile-unlink.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-readfile-unlink.js b/test/parallel/test-fs-readfile-unlink.js index 1be81b824c5468..5b1cbd14f9c4a4 100644 --- a/test/parallel/test-fs-readfile-unlink.js +++ b/test/parallel/test-fs-readfile-unlink.js @@ -5,21 +5,20 @@ const fs = require('fs'); const path = require('path'); const dirName = path.resolve(common.fixturesDir, 'test-readfile-unlink'); const fileName = path.resolve(dirName, 'test.bin'); - -var buf = Buffer.alloc(512 * 1024, 42); +const buf = Buffer.alloc(512 * 1024, 42); try { fs.mkdirSync(dirName); } catch (e) { // Ignore if the directory already exists. - if (e.code != 'EEXIST') throw e; + if (e.code !== 'EEXIST') throw e; } fs.writeFileSync(fileName, buf); fs.readFile(fileName, function(err, data) { assert.ifError(err); - assert.equal(data.length, buf.length); + assert.strictEqual(data.length, buf.length); assert.strictEqual(buf[0], 42); fs.unlinkSync(fileName);