mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
380789eb68
commit
8f2bdaca69
1 file changed
+3
-3
@@ -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'), '');
|
||||
Reference in new issue
Block a user