Skip to content

Commit 6c8b128

Browse files
simonacoBridgeAR
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 <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 3d19a04 commit 6c8b128

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)