Skip to content

Commit 5bd13a3

Browse files
nohman20Fishrock123
authored andcommitted
test: cleanup parallel/test-fs-readfile-unlink.js
Changes var to const, != to !==, and assert.equal() to assert.strict Equal() PR-URL: #8764 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
1 parent f523b82 commit 5bd13a3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/parallel/test-fs-readfile-unlink.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ const fs = require('fs');
55
const path = require('path');
66
const dirName = path.resolve(common.fixturesDir, 'test-readfile-unlink');
77
const fileName = path.resolve(dirName, 'test.bin');
8-
9-
var buf = Buffer.alloc(512 * 1024, 42);
8+
const buf = Buffer.alloc(512 * 1024, 42);
109

1110
try {
1211
fs.mkdirSync(dirName);
1312
} catch (e) {
1413
// Ignore if the directory already exists.
15-
if (e.code != 'EEXIST') throw e;
14+
if (e.code !== 'EEXIST') throw e;
1615
}
1716

1817
fs.writeFileSync(fileName, buf);
1918

2019
fs.readFile(fileName, function(err, data) {
2120
assert.ifError(err);
22-
assert.equal(data.length, buf.length);
21+
assert.strictEqual(data.length, buf.length);
2322
assert.strictEqual(buf[0], 42);
2423

2524
fs.unlinkSync(fileName);

0 commit comments

Comments
 (0)