From 1cfc9e02bbc6f363bde05f8ffd609fa3f17a0d80 Mon Sep 17 00:00:00 2001 From: Simona Cotin Date: Tue, 6 Nov 2018 15:11:41 +0000 Subject: [PATCH] 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. --- test/parallel/test-fs-readfile-empty.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-readfile-empty.js b/test/parallel/test-fs-readfile-empty.js index 36eccfb1162713..7bb942fc2d6fe3 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'), '');