镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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 <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 3d19a04 commit 6c8b128

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
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)