Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use const or let and assert.strictEqual #10001

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions test/parallel/test-fs-read-file-sync.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'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 fn = path.join(common.fixturesDir, 'elipses.txt');
const fn = path.join(common.fixturesDir, 'elipses.txt');

var s = fs.readFileSync(fn, 'utf8');
for (var i = 0; i < s.length; i++) {
assert.equal('\u2026', s[i]);
const s = fs.readFileSync(fn, 'utf8');
for (let i = 0; i < s.length; i++) {
assert.strictEqual('\u2026', s[i]);
}
assert.equal(10000, s.length);
assert.strictEqual(10000, s.length);