From d12d023df43084d118ab196054fac57ec1dfb81a Mon Sep 17 00:00:00 2001 From: sigwyg Date: Sat, 24 Nov 2018 17:11:57 +0900 Subject: [PATCH] test: fix the arguments order in assert.strictEqual I working at "Code and Learn" on Node fest 2018 in Japan. Refs: https://github.com/nodejs/node/pull/24431 PR-URL: https://github.com/nodejs/node/pull/24624 Reviewed-By: Anna Henningsen Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Daijiro Wachi Reviewed-By: Shingo Inoue Reviewed-By: Masashi Hirano --- test/parallel/test-fs-write-string-coerce.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-write-string-coerce.js b/test/parallel/test-fs-write-string-coerce.js index 4581c319277a78..b9ac82aec026c5 100644 --- a/test/parallel/test-fs-write-string-coerce.js +++ b/test/parallel/test-fs-write-string-coerce.js @@ -17,12 +17,12 @@ fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) { fs.write(fd, data, 0, 'utf8', common.mustCall(function(err, written) { console.log('write done'); assert.ifError(err); - assert.strictEqual(Buffer.byteLength(expected), written); + assert.strictEqual(written, Buffer.byteLength(expected)); fs.closeSync(fd); const found = fs.readFileSync(fn, 'utf8'); console.log(`expected: "${expected}"`); console.log(`found: "${found}"`); fs.unlinkSync(fn); - assert.strictEqual(expected, found); + assert.strictEqual(found, expected); })); }));