Skip to content

Commit

Permalink
test: fix the arguments order in assert.strictEqual
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sigwyg authored and BethGriggs committed Feb 12, 2019
1 parent 9f66105 commit 288d60c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-fs-write-string-coerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}));
}));

0 comments on commit 288d60c

Please sign in to comment.