★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/8f2bdaca69Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

test: fix arguments order

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 MylesBorins committed Nov 6, 2018
1 parent 380789e commit 8f2bdaca69ec7d2b1f6623eef03a7bcd3446d6f1
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/parallel/test-fs-readfile-empty.js
@@ -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 8f2bdac

Please sign in to comment.
You can’t perform that action at this time.