Skip to content

Commit 1d88f01

Browse files
simonacocodebytere
authored andcommitted
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>
1 parent d9489e1 commit 1d88f01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ fs.readFile(fn, function(err, data) {
3535
});
3636

3737
fs.readFile(fn, 'utf8', function(err, data) {
38-
assert.strictEqual('', data);
38+
assert.strictEqual(data, '');
3939
});
4040

4141
fs.readFile(fn, { encoding: 'utf8' }, function(err, data) {
42-
assert.strictEqual('', data);
42+
assert.strictEqual(data, '');
4343
});
4444

4545
assert.ok(fs.readFileSync(fn));
46-
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
46+
assert.strictEqual(fs.readFileSync(fn, 'utf8'), '');

0 commit comments

Comments
 (0)