Skip to content

Commit

Permalink
test: fix arguments order
Browse files Browse the repository at this point in the history
the actual and expected arguments in assert.strictEqual() calls are in
the wrong order. Any literal value should be the second argument while
the first argument should be the value returned by a function/be the
calculated value.

PR-URL: #24151
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
simonaco authored and codebytere committed Dec 13, 2018
1 parent d9489e1 commit 1d88f01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-fs-readfile-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ fs.readFile(fn, function(err, data) {
});

fs.readFile(fn, 'utf8', function(err, data) {
assert.strictEqual('', data);
assert.strictEqual(data, '');
});

fs.readFile(fn, { encoding: 'utf8' }, function(err, data) {
assert.strictEqual('', data);
assert.strictEqual(data, '');
});

assert.ok(fs.readFileSync(fn));
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
assert.strictEqual(fs.readFileSync(fn, 'utf8'), '');

0 comments on commit 1d88f01

Please sign in to comment.