test: fix the arguments order in assert.strictEqual
I working at "Code and Learn" on Node fest 2018 in Japan. Refs: https://github.com/nodejs/node/pull/24431 PR-URL: https://github.com/nodejs/node/pull/24624 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
This commit is contained in:
parent
c481799d72
commit
d12d023df4
@ -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);
|
||||
}));
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user