@@ -38,11 +38,11 @@ tmpdir.refresh(); |
38 | 38 | const cb = common.mustCall((err, written) => { |
39 | 39 | assert.ifError(err); |
40 | 40 |
|
41 | | - assert.strictEqual(expected.length, written); |
| 41 | + assert.strictEqual(written, expected.length); |
42 | 42 | fs.closeSync(fd); |
43 | 43 |
|
44 | 44 | const found = fs.readFileSync(filename, 'utf8'); |
45 | | - assert.strictEqual(expected.toString(), found); |
| 45 | + assert.strictEqual(found, expected.toString()); |
46 | 46 | }); |
47 | 47 |
|
48 | 48 | fs.write(fd, expected, 0, expected.length, null, cb); |
@@ -78,7 +78,7 @@ tmpdir.refresh(); |
78 | 78 | const cb = common.mustCall(function(err, written) { |
79 | 79 | assert.ifError(err); |
80 | 80 |
|
81 | | - assert.strictEqual(expected.length, written); |
| 81 | + assert.strictEqual(written, expected.length); |
82 | 82 | fs.closeSync(fd); |
83 | 83 |
|
84 | 84 | const found = fs.readFileSync(filename, 'utf8'); |
@@ -98,7 +98,7 @@ tmpdir.refresh(); |
98 | 98 | const cb = common.mustCall(function(err, written) { |
99 | 99 | assert.ifError(err); |
100 | 100 |
|
101 | | - assert.strictEqual(expected.length, written); |
| 101 | + assert.strictEqual(written, expected.length); |
102 | 102 | fs.closeSync(fd); |
103 | 103 |
|
104 | 104 | const found = fs.readFileSync(filename, 'utf8'); |
@@ -118,11 +118,11 @@ tmpdir.refresh(); |
118 | 118 | const cb = common.mustCall((err, written) => { |
119 | 119 | assert.ifError(err); |
120 | 120 |
|
121 | | - assert.strictEqual(expected.length, written); |
| 121 | + assert.strictEqual(written, expected.length); |
122 | 122 | fs.closeSync(fd); |
123 | 123 |
|
124 | 124 | const found = fs.readFileSync(filename, 'utf8'); |
125 | | - assert.strictEqual(expected.toString(), found); |
| 125 | + assert.strictEqual(found, expected.toString()); |
126 | 126 | }); |
127 | 127 |
|
128 | 128 | fs.write(fd, expected, undefined, undefined, cb); |
@@ -138,11 +138,11 @@ tmpdir.refresh(); |
138 | 138 | const cb = common.mustCall((err, written) => { |
139 | 139 | assert.ifError(err); |
140 | 140 |
|
141 | | - assert.strictEqual(expected.length, written); |
| 141 | + assert.strictEqual(written, expected.length); |
142 | 142 | fs.closeSync(fd); |
143 | 143 |
|
144 | 144 | const found = fs.readFileSync(filename, 'utf8'); |
145 | | - assert.strictEqual(expected.toString(), found); |
| 145 | + assert.strictEqual(found, expected.toString()); |
146 | 146 | }); |
147 | 147 |
|
148 | 148 | fs.write(fd, Uint8Array.from(expected), cb); |
|