Skip to content

Commit 43bfb13

Browse files
na9amuraBethGriggs
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 760277e commit 43bfb13

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ tmpdir.refresh();
3838
constcb=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
constfound=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
constcb=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
constfound=fs.readFileSync(filename,'utf8');
@@ -98,7 +98,7 @@ tmpdir.refresh();
9898
constcb=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
constfound=fs.readFileSync(filename,'utf8');
@@ -118,11 +118,11 @@ tmpdir.refresh();
118118
constcb=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
constfound=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
constcb=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
constfound=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)