From a2b6f2078f9460fc44d121d49317fcd1920ede17 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 --- 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); })); }));