summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-readfile-empty.js
diff options
context:
space:
mode:
authorSimona Cotin <simona.cotin@gmail.com>2018-11-06 15:11:41 +0000
committerRich Trott <rtrott@gmail.com>2018-11-09 00:01:43 -0800
commite1c4e918c37da28debfb730987c36d6e5b053289 (patch)
treeffe2fe9cc7a2798f6d7a3cc4aae755ea7ba8fff9 /test/parallel/test-fs-readfile-empty.js
parent16a199ad0595121daed38c3ac439673ffa8f5198 (diff)
downloadandroid-node-v8-e1c4e918c37da28debfb730987c36d6e5b053289.tar.gz
android-node-v8-e1c4e918c37da28debfb730987c36d6e5b053289.tar.bz2
android-node-v8-e1c4e918c37da28debfb730987c36d6e5b053289.zip
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>
Diffstat (limited to 'test/parallel/test-fs-readfile-empty.js')
-rw-r--r--test/parallel/test-fs-readfile-empty.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-fs-readfile-empty.js b/test/parallel/test-fs-readfile-empty.js
index 36eccfb116..7bb942fc2d 100644
--- a/test/parallel/test-fs-readfile-empty.js
+++ b/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'), '');