Skip to content

Commit a2b6f20

Browse files
author
sigwyg
committed
test: fix the arguments order in assert.strictEqual
I working at "Code and Learn" on Node fest 2018 in Japan. Refs: nodejs#24431
1 parent ce890a0 commit a2b6f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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)