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: nodejs#24431
  • Loading branch information
sigwyg committed Nov 24, 2018
1 parent ce890a0 commit a2b6f20
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 a2b6f20

Please sign in to comment.