Skip to content

Commit f2971b6

Browse files
RafaelGSStargos
authored andcommittedOct 2, 2024
benchmark: change assert() to assert.ok()
PR-URL: #54254 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a110409 commit f2971b6

8 files changed

+10
-10
lines changed
 

‎benchmark/fs/bench-chownSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function main({ n, type, method }) {
4545
}
4646
}
4747
bench.end(n);
48-
assert(hasError);
48+
assert.ok(hasError);
4949
break;
5050
}
5151
default:

‎benchmark/fs/bench-linkSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function main({ n, type }) {
4141
}
4242
}
4343
bench.end(n);
44-
assert(hasError);
44+
assert.ok(hasError);
4545
break;
4646
}
4747
default:

‎benchmark/fs/bench-readlinkSync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function main({ n, type }) {
3030
returnValue = fs.readlinkSync(tmpdir.resolve(`.readlink-sync-${i}`), { encoding: 'utf8' });
3131
}
3232
bench.end(n);
33-
assert(returnValue);
33+
assert.ok(returnValue);
3434
break;
3535
}
3636

@@ -45,7 +45,7 @@ function main({ n, type }) {
4545
}
4646
}
4747
bench.end(n);
48-
assert(hasError);
48+
assert.ok(hasError);
4949
break;
5050
}
5151
default:

‎benchmark/fs/bench-readvSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function main({ n, type }) {
4949
}
5050

5151
bench.end(n);
52-
assert(hasError);
52+
assert.ok(hasError);
5353
break;
5454
}
5555
default:

‎benchmark/fs/bench-renameSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function main({ n, type }) {
2323
}
2424
}
2525
bench.end(n);
26-
assert(hasError);
26+
assert.ok(hasError);
2727
break;
2828
}
2929
case 'valid': {

‎benchmark/fs/bench-symlinkSync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function main({ n, type }) {
4242
}
4343
}
4444
bench.end(n);
45-
assert(hasError);
45+
assert.ok(hasError);
4646
break;
4747
}
4848
default:

‎benchmark/fs/bench-writevSync.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function main({ n, type }) {
3030
}
3131

3232
bench.end(n);
33-
assert(result);
33+
assert.ok(result);
3434
fs.closeSync(fd);
3535
break;
3636
case 'invalid': {
@@ -46,7 +46,7 @@ function main({ n, type }) {
4646
}
4747

4848
bench.end(n);
49-
assert(hasError);
49+
assert.ok(hasError);
5050
break;
5151
}
5252
default:

‎benchmark/fs/read-stream-throughput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function main(conf) {
6767
}
6868

6969
function runTest(filesize, highWaterMark, encoding, n) {
70-
assert(fs.statSync(filename).size === filesize * n);
70+
assert.strictEqual(fs.statSync(filename).size, filesize * n);
7171
const rs = fs.createReadStream(filename, {
7272
highWaterMark,
7373
encoding,

0 commit comments

Comments
 (0)
Please sign in to comment.