mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: fix arguments order in assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/24621 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
This commit is contained in:
1 parent
b2dfddc353
commit
c58f6a9351
1 file changed
+8
-8
@@ -38,11 +38,11 @@ tmpdir.refresh();
|
||||
const cb = common.mustCall((err, written) => {
|
||||
assert.ifError(err);
|
||||
|
||||
assert.strictEqual(expected.length, written);
|
||||
assert.strictEqual(written, expected.length);
|
||||
fs.closeSync(fd);
|
||||
|
||||
const found = fs.readFileSync(filename, 'utf8');
|
||||
assert.strictEqual(expected.toString(), found);
|
||||
assert.strictEqual(found, expected.toString());
|
||||
});
|
||||
|
||||
fs.write(fd, expected, 0, expected.length, null, cb);
|
||||
@@ -78,7 +78,7 @@ tmpdir.refresh();
|
||||
const cb = common.mustCall(function(err, written) {
|
||||
assert.ifError(err);
|
||||
|
||||
assert.strictEqual(expected.length, written);
|
||||
assert.strictEqual(written, expected.length);
|
||||
fs.closeSync(fd);
|
||||
|
||||
const found = fs.readFileSync(filename, 'utf8');
|
||||
@@ -98,7 +98,7 @@ tmpdir.refresh();
|
||||
const cb = common.mustCall(function(err, written) {
|
||||
assert.ifError(err);
|
||||
|
||||
assert.strictEqual(expected.length, written);
|
||||
assert.strictEqual(written, expected.length);
|
||||
fs.closeSync(fd);
|
||||
|
||||
const found = fs.readFileSync(filename, 'utf8');
|
||||
@@ -118,11 +118,11 @@ tmpdir.refresh();
|
||||
const cb = common.mustCall((err, written) => {
|
||||
assert.ifError(err);
|
||||
|
||||
assert.strictEqual(expected.length, written);
|
||||
assert.strictEqual(written, expected.length);
|
||||
fs.closeSync(fd);
|
||||
|
||||
const found = fs.readFileSync(filename, 'utf8');
|
||||
assert.strictEqual(expected.toString(), found);
|
||||
assert.strictEqual(found, expected.toString());
|
||||
});
|
||||
|
||||
fs.write(fd, expected, undefined, undefined, cb);
|
||||
@@ -138,11 +138,11 @@ tmpdir.refresh();
|
||||
const cb = common.mustCall((err, written) => {
|
||||
assert.ifError(err);
|
||||
|
||||
assert.strictEqual(expected.length, written);
|
||||
assert.strictEqual(written, expected.length);
|
||||
fs.closeSync(fd);
|
||||
|
||||
const found = fs.readFileSync(filename, 'utf8');
|
||||
assert.strictEqual(expected.toString(), found);
|
||||
assert.strictEqual(found, expected.toString());
|
||||
});
|
||||
|
||||
fs.write(fd, Uint8Array.from(expected), cb);
|
||||
|
||||
Reference in new issue
Block a user