diff options
author | Simona Cotin <simona.cotin@gmail.com> | 2018-11-06 15:11:41 +0000 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-09 00:01:43 -0800 |
commit | e1c4e918c37da28debfb730987c36d6e5b053289 (patch) | |
tree | ffe2fe9cc7a2798f6d7a3cc4aae755ea7ba8fff9 /test/parallel/test-fs-readfile-empty.js | |
parent | 16a199ad0595121daed38c3ac439673ffa8f5198 (diff) | |
download | android-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.js | 6 |
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'), ''); |