Skip to content

Commit 603bc27

Browse files
sigwygtargos
sigwyg
authored andcommitted
test: fix the arguments order in assert.strictEqual
I working at "Code and Learn" on Node fest 2018 in Japan. Refs: #24431 PR-URL: #24624 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Shingo Inoue <[email protected]> Reviewed-By: Masashi Hirano <[email protected]>
1 parent 969ae7a commit 603bc27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-write-string-coerce.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ fs.open(fn, 'w', 0o644, common.mustCall(function(err, fd) {
1717
fs.write(fd, data, 0, 'utf8', common.mustCall(function(err, written) {
1818
console.log('write done');
1919
assert.ifError(err);
20-
assert.strictEqual(Buffer.byteLength(expected), written);
20+
assert.strictEqual(written, Buffer.byteLength(expected));
2121
fs.closeSync(fd);
2222
const found = fs.readFileSync(fn, 'utf8');
2323
console.log(`expected: "${expected}"`);
2424
console.log(`found: "${found}"`);
2525
fs.unlinkSync(fn);
26-
assert.strictEqual(expected, found);
26+
assert.strictEqual(found, expected);
2727
}));
2828
}));

0 commit comments

Comments
 (0)