Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: fix the arguments order in assert.strictEqual
I working at "Code and Learn" on Node fest 2018 in Japan.

Refs: #24431
  • Loading branch information
sigwyg committed Nov 24, 2018
commit a2b6f2078f9460fc44d121d49317fcd1920ede17
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);
}));
}));