Skip to content

Commit 8072a2b

Browse files
na9amuratargos
authored andcommitted
test: fix arguments order in assert.strictEqual
PR-URL: #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>
1 parent 7ef516a commit 8072a2b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/parallel/test-fs-write-buffer.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ tmpdir.refresh();
3838
const cb = common.mustCall((err, written) => {
3939
assert.ifError(err);
4040

41-
assert.strictEqual(expected.length, written);
41+
assert.strictEqual(written, expected.length);
4242
fs.closeSync(fd);
4343

4444
const found = fs.readFileSync(filename, 'utf8');
45-
assert.strictEqual(expected.toString(), found);
45+
assert.strictEqual(found, expected.toString());
4646
});
4747

4848
fs.write(fd, expected, 0, expected.length, null, cb);
@@ -78,7 +78,7 @@ tmpdir.refresh();
7878
const cb = common.mustCall(function(err, written) {
7979
assert.ifError(err);
8080

81-
assert.strictEqual(expected.length, written);
81+
assert.strictEqual(written, expected.length);
8282
fs.closeSync(fd);
8383

8484
const found = fs.readFileSync(filename, 'utf8');
@@ -98,7 +98,7 @@ tmpdir.refresh();
9898
const cb = common.mustCall(function(err, written) {
9999
assert.ifError(err);
100100

101-
assert.strictEqual(expected.length, written);
101+
assert.strictEqual(written, expected.length);
102102
fs.closeSync(fd);
103103

104104
const found = fs.readFileSync(filename, 'utf8');
@@ -118,11 +118,11 @@ tmpdir.refresh();
118118
const cb = common.mustCall((err, written) => {
119119
assert.ifError(err);
120120

121-
assert.strictEqual(expected.length, written);
121+
assert.strictEqual(written, expected.length);
122122
fs.closeSync(fd);
123123

124124
const found = fs.readFileSync(filename, 'utf8');
125-
assert.strictEqual(expected.toString(), found);
125+
assert.strictEqual(found, expected.toString());
126126
});
127127

128128
fs.write(fd, expected, undefined, undefined, cb);
@@ -138,11 +138,11 @@ tmpdir.refresh();
138138
const cb = common.mustCall((err, written) => {
139139
assert.ifError(err);
140140

141-
assert.strictEqual(expected.length, written);
141+
assert.strictEqual(written, expected.length);
142142
fs.closeSync(fd);
143143

144144
const found = fs.readFileSync(filename, 'utf8');
145-
assert.strictEqual(expected.toString(), found);
145+
assert.strictEqual(found, expected.toString());
146146
});
147147

148148
fs.write(fd, Uint8Array.from(expected), cb);

0 commit comments

Comments
 (0)